[llvm-readobj/llvm-readelf] - Reimplement dumping of the SHT_GNU_verdef section.
authorGeorgii Rymar <grimar@accesssoftek.com>
Wed, 20 Nov 2019 14:37:56 +0000 (17:37 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Tue, 26 Nov 2019 14:15:39 +0000 (17:15 +0300)
commitd88f67bdca7526c2adc3749bb2cfef6b32da971c
tree10e57200e52c22e82db190ca24331a637ebca185
parent5871cba86172c5bd947952a9441acf80332455ea
[llvm-readobj/llvm-readelf] - Reimplement dumping of the SHT_GNU_verdef section.

Currently we have following issues:
1) We have 2 different implementations with a different behaviors for GNU/LLVM styles.
2) Errors are either not handled at all or we call report_fatal_error with not helpfull messages.
3) There is no test coverage even for those errors that are reported.

This patch reimplements parsing of the SHT_GNU_verdef section entries
in a single place, adds a few error messages and test coverage.

Differential revision: https://reviews.llvm.org/D70495
llvm/test/tools/llvm-readobj/elf-versioninfo.test
llvm/test/tools/yaml2obj/ELF/verdef-section.yaml
llvm/tools/llvm-readobj/ELFDumper.cpp