[PATCH] D61937: [llvm-readelf] - Rework how we parse the .dynamic section.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 03:33:49 PDT 2019


grimar created this revision.
grimar added reviewers: jhenderson, jakehehrlich, rupprecht.

This is a result of what I found during my work on https://bugs.llvm.org/show_bug.cgi?id=41679.

Previously LLVM readelf took the information about .dynamic section from its PT_DYNAMIC segment only.
GNU tools have a bit different logic. They also use the information from the .dynamic section header if it is available.
This patch changes the code to improve the compatibility with the GNU Binutils.

I also think it should resolve the problems from PR mentioned.


https://reviews.llvm.org/D61937

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61937.199572.patch
Type: text/x-patch
Size: 9934 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190515/dc87751d/attachment.bin>


More information about the llvm-commits mailing list