This is an archive of the discontinued LLVM Phabricator instance.

[llvm-objdump] Also suppress --dyn-relocs when --disassemble is provided
Needs ReviewPublic

Authored by rupprecht on Oct 1 2019, 2:36 PM.

Details

Reviewers
jhenderson
Summary

This suppression is currently enabled for --relocs, but not --dyn-relocs. Apply it there for consistency, as well as matching GNU objdump behavior.

Split off from D68066 which rearranges objdump sections.

Event Timeline

rupprecht created this revision.Oct 1 2019, 2:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 1 2019, 2:36 PM
jhenderson added inline comments.Oct 2 2019, 1:29 AM
llvm/test/tools/llvm-objdump/X86/elf-disassemble-dynamic-relocs.test
13

Does objdump (GNU or LLVM) print dynamic relocations inline like it does with static ones? Your comment suggests it does, but you don't attempt to test it anywhere.

17

Here and throughout, get rid of excessive space.

36

This seems like an awful lot of content unnecessarily... can you not just have a single call instruction to a given symbol? Do you even need that? Isn't it sufficient to show that "Disassembly of .text" is printed?

(If relocations are printed inline, you might want a call instruction, but could use a RELATIVE relocation to remove the need for a dynamic symbol).

37–41

I don't think you need a .plt. Just a relocation in .rela.dyn (or .rela.plt) is sufficient.