[llvm-readelf/llvm-readobj] - Check the version of SHT_GNU_verneed section entries.
authorGeorgii Rymar <grimar@accesssoftek.com>
Fri, 29 Nov 2019 08:57:13 +0000 (11:57 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Mon, 2 Dec 2019 09:57:23 +0000 (12:57 +0300)
commit7eecf2b872e506927f59b6a1f4a8546d8baaa700
tree40b554e44916be8cdac3d5cdcefb041873896ca1
parentece8fed609061638bc867ecb74e179cb86426d60
[llvm-readelf/llvm-readobj] - Check the version of SHT_GNU_verneed section entries.

It is a follow-up for D70826 and it is similar to D70810.

SHT_GNU_verneed contains the following fields:
`vn_version`: Version of structure. This value is currently set to 1, and will be reset
if the versioning implementation is incompatibly altered.
(https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/symversion.html)

We should check it for correctness.

Differential revision: https://reviews.llvm.org/D70842
llvm/test/tools/llvm-readobj/elf-verneed-invalid.test
llvm/tools/llvm-readobj/ELFDumper.cpp