Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu_rec wrong detection case with clang assembled RISC-V64 binary #20

Open
Popolon opened this issue Mar 26, 2024 · 1 comment
Open

Comments

@Popolon
Copy link

Popolon commented Mar 26, 2024

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

@LRGH
Copy link
Collaborator

LRGH commented Mar 28, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants