cpu_rec
cpu_rec copied to clipboard
cpu_rec wrong detection case with clang assembled RISC-V64 binary
In attachement, a RISC-V binary, object file and assembly source code, assembled with clang. The binary is wrongly detected as OCaml.
If I'm not wrong, I used these instruction to make this binary clang_build64.sh:
file=${1//.s}
clang --target=riscv64 -march=rv64imac -mno-relax ${file}.s -c -o ${file}.o
ld.lld -strip-all ${file}.o -o ${file}
This binary is very small, and contains almost no instructions (the .text section is 32 bytes long), that's why cpu_rec does not detect the type of cpu. Do you have the same issue when running cpu_rec on RISC-V binaries that actually do something?