[llvm-readobj] - Improve error reporting for hash tables.
authorGeorgii Rymar <grimar@accesssoftek.com>
Thu, 21 May 2020 10:57:41 +0000 (13:57 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Mon, 1 Jun 2020 09:36:23 +0000 (12:36 +0300)
commite75efcc3c1af068a145ea83deb0435b195a44162
tree3ba035d0d2a450045af14ff305099bacadaa6f29
parentdace8224f38a31636a02fe9c2af742222831f70c
[llvm-readobj] - Improve error reporting for hash tables.

This improves the next points for broken hash tables:

1) Use reportUniqueWarning to prevent duplication when
   --hash-table and --elf-hash-histogram are used together.

2) Dump nbuckets and nchain fields. It is often possible
   to dump them even when the table itself goes past the EOF etc.

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