[PATCH] D67547: [llvm-readobj/llvm-objdump] - Improve how tool locate the dynamic table and report warnings about that.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 06:20:04 PDT 2019


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay, rupprecht.
Herald added a subscriber: seiya.

Before this patch we gave a priority to a dynamic table found
from the section header.

It was discussed (here: https://reviews.llvm.org/D67078?id=218356#inline-602082)
that probably preferring the table from PT_DYNAMIC is better,
because it is what runtime loader sees.

This patch makes the table from PT_DYNAMIC be chosen at first place if it is available.
But also it adds logic to fall back to SHT_DYNAMIC if the table from the dynamic segment is
broken or fall back to use no table if both are broken.

It adds a few more diagnostic warnings for the logic above.


https://reviews.llvm.org/D67547

Files:
  test/tools/llvm-readobj/elf-dynamic-malformed.test
  test/tools/llvm-readobj/elf-dynamic-not-in-pt-dynamic.test
  test/tools/llvm-readobj/elf-non-dynamic-in-pt-dynamic.test
  tools/llvm-readobj/ELFDumper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67547.220081.patch
Type: text/x-patch
Size: 19030 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190913/32cbf43d/attachment.bin>


More information about the llvm-commits mailing list