-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Disabling CAPSTONE_RISCV_SUPPORT causes a crash during the build #2887
Copy link
Copy link
Open
Description
Work environment
| Questions | Answers |
|---|---|
| System Capstone runs on OS/arch/bits | Debian x86_64 |
| Capstone module affected | All, but RISC-V |
| Source of Capstone | git clone |
| Version/git commit | v6.0.0, 08e655c |
Expected behavior
Disabling CAPSTONE_RISCV_SUPPORT from being built shouldn't cause an error.
Actual behavior
Excluding it results in an error due to getSysRegName() in cstool/cstool_riscv.c and suite/cstest/src/test_detail_riscv.c.
Steps to reproduce the behavior
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCAPSTONE_ARCHITECTURE_DEFAULT=0 -DCAPSTONE_X86_SUPPORT=1
cmake --build build -jAdditional Logs, screenshots, source code, configuration dump, ...
CMake error:
/usr/bin/riscv64-linux-gnu-ld.bfd: CMakeFiles/cstool.dir/cstool/cstool_riscv.c.o: in function `print_insn_detail_riscv':
/root/capstone/cstool/cstool_riscv.c:47:(.text+0x170): undefined reference to `getSysRegName'
/usr/bin/riscv64-linux-gnu-ld.bfd: relocation R_RISCV_CALL_PLT against `getSysRegName' which may bind externally can not be used when making a shared object; recompile with -fPICReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels