OSDN Git Service

[llvm-readobj] - Fix a crash scenario in GNUStyle<ELFT>::printHashSymbols().
authorGeorgii Rymar <grimar@accesssoftek.com>
Thu, 2 Jul 2020 10:38:42 +0000 (13:38 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Tue, 7 Jul 2020 08:59:00 +0000 (11:59 +0300)
commitd5cbf7ba32527dba53fa673ff7fd7f7fbb0b82fc
tree632f0d83a9da5abf451e64f0c4433ae5f11fd98f
parentcd503166fb74baf91c55f5f959ed9cd016cbd9f7
[llvm-readobj] - Fix a crash scenario in GNUStyle<ELFT>::printHashSymbols().

We might crash when the dynamic symbols table is empty (or not found)
and --hash-symbols is requested. Both .hash and .gnu.hash logic is affected.

The patch fixes this issue.

Differential revision: https://reviews.llvm.org/D83037
llvm/test/tools/llvm-readobj/ELF/hash-symbols.test
llvm/tools/llvm-readobj/ELFDumper.cpp