[llvm-readobj/llvm-readelf] - Report a proper warning when dumping a broken dynamic...
commitfd539ca470a9dccdb77938b7dac110eb7148c966
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 29 Aug 2019 10:55:57 +0000 (29 10:55 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 29 Aug 2019 10:55:57 +0000 (29 10:55 +0000)
treeed4b582f9eb2cb6ec8027f78f07d3fbe6e0b1a1f
parent51cf1714f8236eac36f46048f4b714377e2fca6b
[llvm-readobj/llvm-readelf] - Report a proper warning when dumping a broken dynamic relocation.

When we have a dynamic relocation with a broken symbol's st_name,
tools report a useless error: "Invalid data was encountered while parsing the file".

After this change we report a warning + "<corrupt>" as a symbol name.

Differential revision: https://reviews.llvm.org/D66734

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370330 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/ELFTypes.h
test/Object/invalid.test
test/tools/llvm-readobj/elf-broken-dynamic-reloc-name.test [new file with mode: 0644]
tools/llvm-readobj/ELFDumper.cpp