[PATCH] D73560: [llvm-readobj] - Don't crash when dumping invalid dynamic relocation.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 30 04:23:50 PST 2020


grimar added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/broken-dynamic-reloc.test:383-384
+# LLVM-NO-DYNSYM:      Dynamic Relocations {
+# LLVM-NO-DYNSYM-NEXT: warning: '[[FILE]]': unable to get name of the dynamic symbol with index 0: no dynamic symbol table found
+# LLVM-NO-DYNSYM-NEXT:   0x0 R_X86_64_NONE <corrupt> 0x0
+# LLVM-NO-DYNSYM-NEXT: warning: '[[FILE]]': unable to get name of the dynamic symbol with index 1: no dynamic symbol table found
----------------
jhenderson wrote:
> Do we have a test case somewhere that shows that relocations without symbols (e.g. R_X86_64_RELATIVE) are handled fine without warning?
Yes, I think the test case is:
https://github.com/llvm/llvm-project/blob/master/llvm/test/tools/llvm-readobj/ELF/reloc-zero-name-or-value.test#L22
We have the R_X86_64_NONE dynamic relocation with no symbol and no warnings.


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

https://reviews.llvm.org/D73560





More information about the llvm-commits mailing list