cpu_rec icon indicating copy to clipboard operation
cpu_rec copied to clipboard

cpu_rec wrong detection case with clang assembled RISC-V64 binary

Open Popolon opened this issue 1 year ago • 1 comments

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}

hello_clang.tar.gz

Popolon avatar Mar 26 '24 09:03 Popolon

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?

LRGH avatar Mar 28 '24 22:03 LRGH