It's good programming practice to define module-local symbols as static (assuming C). Unfortunately, that interferes with analysis of the resulting object/binary files. For example, GNU ld map file (-Map=...) doesn't include static symbols, so important information is missed (like, how many symbols there're really in a module, size of each function defined, etc.).
Is there way to ask GNU ld to include static symbols in a map file, without modifying original source code? (It's obvious that one can make static modifier conditional, but that's quite a chore when analyzing bunch of 3rd-party projects.)
Although the linker map file and nm
don't include symbols without extern linkage, objdump
does (as long as debug information is available). You'll want the -t
option.
See this related answer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With