[PATCH] D72992: [llvm-objdump] - Add column headers for relocation printing

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 27 11:25:44 PST 2020


MaskRay added a comment.

>   and allows for better

Looks like the summary misses some sentence.



================
Comment at: llvm/test/tools/llvm-objdump/relocations-elf.test:191
+- Name: .rela.text
+  Type: SHT_RELA
+  Link: .symtab
----------------
grimar wrote:
> jhenderson wrote:
> > jhenderson wrote:
> > > grimar wrote:
> > > > grimar wrote:
> > > > > It is strange to see `SHT_RELA` section in a `ELFCLASS32` object.
> > > > > What do you want to check with it? I see it is what the test case above did, but I do not know why it does that :)
> > > > (I mean it has `SHT_REL`, what is unnatural for `ELFCLASS64` in the same way like `SHT_RELA` is unnatural for `ELFCLASS32`). 
> > > I'd keep both SHT_REL and SHT_RELA sections. The gABI doesn't limit these sections to architectures of one or other size (although some processor supplements do), so we should show we can handle all situations. I know at least one system I worked on used SHT_REL originally and then later swapped to SHT_RELA.
> > @grimar, are you happy with my suggestion of keeping both?
> Ah, yes, sorry for not adding an explicit comment about it.
lld accepts both SHT_REL and SHT_RELA input. It produces either SHT_REL or SHT_RELA depending on `config->isRela` (like a target preference).

powerpc and riscv32 are two 32-bit targets using RELA.


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

https://reviews.llvm.org/D72992





More information about the llvm-commits mailing list