[PATCH] D90214: [llvm-readobj/elf] - Fix a crash when dumping a dynamic relocation that refer to a symbol past the EOF.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 03:26:08 PDT 2020


jhenderson added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/broken-dynamic-reloc.test:384-385
+    Relocations:
+## A valid symbol right before EOF.
+      - Symbol: 0x1D
+        Type:   R_X86_64_NONE
----------------
These values are presumably tied to the size of data in other implicit sections, right? Could we arrange for those sections to appear before .dynsym, as well as the .rela.dyn section? That way, the .dynsym will actually appear at the end of the file, and it would be easier to see that the symbol indexes are what you say they are.

It's probably also worth expanding on what is meant by "valid" here, since the .dynsym appears to be essentially empty (and therefore any indexes into it could be viewed as invalid).


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

https://reviews.llvm.org/D90214



More information about the llvm-commits mailing list