[PATCH] D89384: [llvm-readobj/elf] - Change the behavior of handing DT_SONAME.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 04:41:24 PDT 2020


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: rupprecht, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
grimar requested review of this revision.

The current situation/behavior is:

1. llvm-readelf doesn't need a string that is specified by `DT_SONAME`.
2. llvm-readobj/elf always tries to read it, even when there is no `DT_SONAME` tag.
3. Because of that both tools reports a warning for many our test cases.

This patch delays getting a SOName string and changes the behavior (llvm-readobj) to
only report a warning when there is a `DT_SONAME` and a string cab't be read.
Warning is not reported for llvm-readelf, as it never tries to dump it.


https://reviews.llvm.org/D89384

Files:
  llvm/test/tools/llvm-readobj/ELF/dynamic-malformed.test
  llvm/test/tools/llvm-readobj/ELF/dynamic-tags.test
  llvm/test/tools/llvm-readobj/ELF/hash-table.test
  llvm/test/tools/llvm-readobj/ELF/needed-libs.test
  llvm/tools/llvm-readobj/ELFDumper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89384.298115.patch
Type: text/x-patch
Size: 13901 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201014/c8eb32ad/attachment.bin>


More information about the llvm-commits mailing list