[PATCH] D70810: [llvm-readelf/llvm-readobj] - Check version of SHT_GNU_verdef section entries when dumping.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 28 03:28:15 PST 2019


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: seiya, dmgreen, rupprecht.
Herald added a project: LLVM.

Elfxx_Verdef contains the following field:

`vd_version`
Version revision. This value is currently set to 1, and will be reset if the versioning implementation is incompatibly altered.
(http://refspecs.linuxbase.org/LSB_1.3.0/gLSB/gLSB/symverdefs.html)

Our code should check the struct version for correctness. This patch does that.
(This will help to simplify or eliminate `ELFDumper<ELFT>::LoadVersionDefs()` which
has it's own logic to parse version definitions for no reason. It checks the struct version currently).


https://reviews.llvm.org/D70810

Files:
  llvm/test/tools/llvm-readobj/elf-verdef-invalid.test
  llvm/tools/llvm-readobj/ELFDumper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70810.231397.patch
Type: text/x-patch
Size: 3724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191128/f563bbec/attachment.bin>


More information about the llvm-commits mailing list