[all-commits] [llvm/llvm-project] 7ab148: [llvm-readelf/llvm-readobj] - Check version of SHT...

Georgii Rymar via All-commits all-commits at lists.llvm.org
Fri Nov 29 00:10:28 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ab14813619189d13382da047409a81c94ebc58d
      https://github.com/llvm/llvm-project/commit/7ab14813619189d13382da047409a81c94ebc58d
  Author: Georgii Rymar <grimar at accesssoftek.com>
  Date:   2019-11-29 (Fri, 29 Nov 2019)

  Changed paths:
    M llvm/test/tools/llvm-readobj/elf-verdef-invalid.test
    M llvm/tools/llvm-readobj/ELFDumper.cpp

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

Elfxx_Verdef contains the following field:

vd_version
Version revision. This field shall be set to 1.
(https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/symversion.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).

Differential revision: https://reviews.llvm.org/D70810




More information about the All-commits mailing list