[llvm-readobj] - Don't crash when a broken GNU hash table is dumped with --hash-symbols.
authorGeorgii Rymar <grimar@accesssoftek.com>
Wed, 24 Jun 2020 10:23:04 +0000 (13:23 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Wed, 24 Jun 2020 12:55:43 +0000 (15:55 +0300)
commit3249bfda9678724207803ce675505ffbfa65a372
tree54ea002447a38260c6b5d9c61c13095bdb5a1158
parentbf77c7ef2dec2fb1d123bbd6250cb8e7973ed4ba
[llvm-readobj] - Don't crash when a broken GNU hash table is dumped with --hash-symbols.

Start using the `checkGNUHashTable` helper which was recently introduced to report
a proper warning when a GNU hash table goes past the end of the file.

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