For example, I define a macro:
#ifdef VERSION
//.... do something
#endif
How can I check if VERSION exist in my object file or not? I tried to disassemble it with objdump, but found no actual value of my macro VERSION. VERSION is defined in Makefile.
Try compiling with
-g3option ingcc. It stores macro information too in the generated ELF file.After this, if you’ve defined a macro
MACRO_NAMEjustgrepfor it in the output executable or your object file. For example,Or you can even try,