[PATCH] D100489: [llvm-readobj] Fix dumping dynamic relative relocations for SHT_REL

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 15 02:38:50 PDT 2021


arichardson added a comment.

Hopefully the new test is better?



================
Comment at: llvm/test/tools/llvm-objdump/X86/elf-dynamic-relocs-rel.test:1
+## Show that llvm-objdump can dump dynamic relocations for Elf_Rel relocations
+## Previously printing the R_386_RELATIVE relocations would trigger
----------------
arichardson wrote:
> MaskRay wrote:
> > This looks verbose.
> > 
> > If you just keep things as in `test/tools/llvm-readelf/ELF/reloc-types-elf-i386.test`, does it work?
> > llvm-readobj generally has better support for ELF dumping and you may take inspiration from its tests.
> Yes, I should have reduced this test input further, right now it's just and obj2yaml of an lld test with a few obvious lines removed. Will remove everything that's not needed for the relative relocation tomorrow.
I could add a RELATIVE reloc to a .o file as in `test/tools/llvm-readelf/ELF/reloc-types-elf-i386.test`, but I thought using a dynamic relocation like `llvm/test/tools/llvm-readobj/ELF/dynamic-reloc.test` makes more sense.
The latest version also checks both relocations with and without a symbol (the same as `llvm/test/tools/llvm-objdump/X86/elf-dynamic-relocs.test`)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100489/new/

https://reviews.llvm.org/D100489



More information about the llvm-commits mailing list