[LLVMdev] llvm-objdump

Steve King steve at metrokings.com
Tue Aug 26 09:52:47 PDT 2014


I would like to improve llvm-objdump.  However, many unit tests depend
precisely on the current output, making the picture a little tricky.
My experience is limited to ELF format objects, so experts in other
formats please sanity check.

Suggested changes:
1) Symbolize conditional branch targets.  Currently, llvm-objdump
prints branch targets numerically regardless of -symbolize.

2) Make -symbolize the default behavior for human friendliness.

3) Add new -bare option to suppress symbolizing.  Many unit tests will
use -bare to preserve expected output in today's format.

4) When multiple symbols exist for a given address, print all of them.
Today, llvm-objdump only prints the last symbol found, but symbolizes
references with the first symbol found.  So, it's a bit of a mess.

5) When symbolizing code references, prefer matching symbols with type
FUNC, but fall back to matches with type NOTYPE.  This matches GNU
objdump behavior and many hand written assembly files don't specify
.type directives anyway.

How does this sound?

Regards,
-steve



More information about the llvm-dev mailing list