[PATCH] D89391: [yaml2obj] - Allow specifying no tags to create empty sections in few cases.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 06:29:23 PDT 2020


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

Currently we have a few sections that
does not support specifying no keys for them. E.g. it is required that one
of "Content", "Size" or "Entries" key is present. There is no reason to
have this restriction. We can allow this and emit an empty section instead.

This opens road for a simplification and generalization of the code in `validate()`
that is discussed in the D89039 <https://reviews.llvm.org/D89039> thread.

Depends on D89039 <https://reviews.llvm.org/D89039>.


https://reviews.llvm.org/D89391

Files:
  llvm/lib/ObjectYAML/ELFEmitter.cpp
  llvm/lib/ObjectYAML/ELFYAML.cpp
  llvm/test/tools/yaml2obj/ELF/gnu-hash-section.yaml
  llvm/test/tools/yaml2obj/ELF/hash-section.yaml
  llvm/test/tools/yaml2obj/ELF/llvm-addrsig-section.yaml
  llvm/test/tools/yaml2obj/ELF/note-section.yaml
  llvm/test/tools/yaml2obj/ELF/stack-sizes.yaml

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89391.298138.patch
Type: text/x-patch
Size: 10924 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201014/483a8f6e/attachment.bin>


More information about the llvm-commits mailing list