[PATCH] D93678: [yaml2obj] - Support selecting the location of the section header table.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 22 01:44:04 PST 2020


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

I've found that sometimes it might be convenient when writing a test to not
put anything after all sections data. Currently we write the section header
table there.

This adds the `Location` sub key to `SectionHeaderTable` key:

  SectionHeaderTable:
    Location:  <value>

Location can be either `AfterSecData` or `BeforeSecData` currently.
This allows to place the section header table before sections data.

This patch also opens road to implement placing the section header table at
an arbitrary position (i.e. between sections).


https://reviews.llvm.org/D93678

Files:
  llvm/include/llvm/ObjectYAML/ELFYAML.h
  llvm/lib/ObjectYAML/ELFEmitter.cpp
  llvm/lib/ObjectYAML/ELFYAML.cpp
  llvm/test/tools/yaml2obj/ELF/section-headers-location.yaml

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93678.313264.patch
Type: text/x-patch
Size: 11776 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201222/dad41653/attachment.bin>


More information about the llvm-commits mailing list