How can differentiate between a rv64imafd and rv64imafdc binary without executing them? I am using few compiler flags for changing the extensions but I'm not sure how to verify it. I don't want to dump the executable every time for testing on my imafd board.
I tried to study objdump of both the files and even though there was a clear difference between the opcodes, but it is not enough.
Let me know if I can share more information on this regard.
Even if you compile with the rv64imafd flag, your executable can be rv64imadfc if you link to a library (or a crt file) compiled with rv64imadfc.
This seems to be the case because your final executable contains the c flag even if you compile to rv64imafd.
If you are using https://github.com/riscv/riscv-gnu-toolchain
The build defaults to targeting rv64gc so you are linking against rv64gc libraries. if you used --enable-multilib you are linking against rv64imafdc.
In order to generate an rv64imafd executable you have three choices:
-march=rv64imafd -mabi=lp64d
t-elf-multilib
to also generate rv64imafd and build the toolchain with --enable-multilib
option.