[PATCH] D83042: [llvm-readelf] - Do not report a misleading warning when there is no string table.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 2 06:25:36 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 added a parent revision: D82955: [llvm-readelf] - Do not error out when dumping symbols..

This is a follow-up for D82955 <https://reviews.llvm.org/D82955>, which allows to continue dumping when a symbol table is broken.
When we are unable to get the string table and trying to print symbols,
the existent tool logic together with D82955 <https://reviews.llvm.org/D82955> reports an error:

"st_name (0x??) is past the end of the string table of size 0x??"

Though, when there is no string table, this message becomes misleading and excessive.
It is easy to fix it though and that is what this patch does.


https://reviews.llvm.org/D83042

Files:
  llvm/test/tools/llvm-readobj/ELF/symbols.test
  llvm/tools/llvm-readobj/ELFDumper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83042.275084.patch
Type: text/x-patch
Size: 6455 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200702/871dcc13/attachment-0001.bin>


More information about the llvm-commits mailing list