[PATCH] D94659: [yaml2obj/obj2yaml] - Refine handling of SHT_GNU_verdef sections.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 14 01:31:15 PST 2021


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: dmgreen, hiraditya, emaste.
Herald added a reviewer: espindola.
grimar requested review of this revision.
Herald added a project: LLVM.

This patch:

1. Makes `Version`, `Flags`, `VersionNdx` and `Hash` fields to be `Optional<>`.
2. Disallows dumping version definitions that have `vd_version != 1`. `vd_version` identifies the version of the structure itself. (https://refspecs.linuxfoundation.org/LSB_1.3.0/gLSB/gLSB/symverdefs.html, https://docs.oracle.com/cd/E19683-01/816-7777/chapter6-80869/index.html)
3. Stops dumping default values for `Version`, `Flags`, `VersionNdx` and `Hash` fields.
4. Refines testing.


https://reviews.llvm.org/D94659

Files:
  llvm/include/llvm/ObjectYAML/ELFYAML.h
  llvm/lib/ObjectYAML/ELFEmitter.cpp
  llvm/lib/ObjectYAML/ELFYAML.cpp
  llvm/test/tools/obj2yaml/ELF/verdef-section.yaml
  llvm/test/tools/yaml2obj/ELF/verdef-section.yaml
  llvm/tools/obj2yaml/elf2yaml.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94659.316588.patch
Type: text/x-patch
Size: 10909 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210114/da63c69b/attachment.bin>


More information about the llvm-commits mailing list