[PATCH] D78927: [yaml2obj] - Introduce the "Offset" property for sections.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 27 07:29:32 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.
Currently there is no good way to set a physical offset for a section:
- We have the `ShOffset` that allows to override the `sh_offset`, but it does not affect the real data written.
- We can use a `Filler` to create an artificial gap, but it is more like a hack rather than a proper solution for this problem.
This patch adds the `Offset` property which allows setting physical
offsets for sections.
It also generalizes the code, so that we set sh_offset field in one place.
https://reviews.llvm.org/D78927
Files:
llvm/include/llvm/ObjectYAML/ELFYAML.h
llvm/lib/ObjectYAML/ELFEmitter.cpp
llvm/lib/ObjectYAML/ELFYAML.cpp
llvm/test/tools/yaml2obj/ELF/custom-null-section.yaml
llvm/test/tools/yaml2obj/ELF/section-offset.yaml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78927.260315.patch
Type: text/x-patch
Size: 23065 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200427/70492162/attachment-0001.bin>
More information about the llvm-commits
mailing list