[PATCH] D80629: [yaml2obj] - Allocate the file space for SHT_NOBITS sections in some cases.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 27 06:27:51 PDT 2020


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

This teaches yaml2obj to allocate file space for a no-bits section
when there is a non-nobits section in the same segment that follows it.

It was discussed in D78005 <https://reviews.llvm.org/D78005> thread and matches GNU linkers behavior.


https://reviews.llvm.org/D80629

Files:
  llvm/lib/ObjectYAML/ELFEmitter.cpp
  llvm/test/tools/llvm-objcopy/ELF/preserve-segment-contents.test
  llvm/test/tools/yaml2obj/ELF/program-header-nobits.yaml

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80629.266513.patch
Type: text/x-patch
Size: 11233 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200527/137e28e6/attachment-0001.bin>


More information about the llvm-commits mailing list