[PATCH] D80520: [yaml2obj] - Map section names to chunks for each ELFYAML::ProgramHeader early. NFCI.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 25 08:01:10 PDT 2020


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

Each `ELFYAML::ProgramHeader` currently contains a list of section names
included. We are trying to map them to Fill/Sections very late,
though we can create such mapping early, in `initProgramHeaders`.

The benefit is that with such change it is possible to access mapped
chunks earlier (for example during writing section content) and have
simpler code.

(I am working on a patch to allocate a file space for no-bits sections
if there are non-nobits sections in a segment that follows them. It needs
such change to avoid code duplication).


https://reviews.llvm.org/D80520

Files:
  llvm/include/llvm/ObjectYAML/ELFYAML.h
  llvm/lib/ObjectYAML/ELFEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80520.266022.patch
Type: text/x-patch
Size: 4130 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200525/70ac9c70/attachment-0001.bin>


More information about the llvm-commits mailing list