[PATCH] D100489: [llvm-objdump] Fix dumping dynamic relative relocations for SHT_REL
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 19 06:27:59 PDT 2021
arichardson added inline comments.
================
Comment at: llvm/test/tools/llvm-objdump/X86/elf-dynamic-relocs-rel.test:9
+
+# CHECK: file format elf32-i386
+# CHECK-LABEL: DYNAMIC RELOCATION RECORDS
----------------
jhenderson wrote:
> I don't think this line is useful?
I agree. I simply copied it from `llvm/test/tools/llvm-objdump/X86/elf-dynamic-relocs.test`. Should I drop it there too?
================
Comment at: llvm/test/tools/llvm-objdump/X86/elf-dynamic-relocs-rel.test:61-63
+Symbols:
+ - Name: foo
+ Section: .data
----------------
jhenderson wrote:
> I think you can omit the static symbol?
Unfortunately that gives me a `yaml2obj` error when using `Symbol: foo` inside `Relocations:`.
I haven't looked at the yaml2obj code, but it seems like we would need to either hardcode dynamic relocation section names or add another attribute to `Relocations` to indicate that it should look in the dynamic symbol list instead. Alternatively, we could make that decision based on the file type (ET_REL uses `Symbols`, all other use `DynamicSymbols`?
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