[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 Jun 10 06:32:10 PDT 2020
grimar updated this revision to Diff 269817.
grimar added a comment.
This revision is now accepted and ready to land.
- Updated tools/obj2yaml/ELF/program-headers.yaml.
Now when we have a 10 MB limitation of the output size produced by yaml2obj,
the `obj2yaml/ELF/program-headers.yaml` test fails.
It has the following case:
- Name: .bss
Type: SHT_NOBITS
Flags: [ SHF_WRITE, SHF_ALLOC ]
## Use a size that is larger than the file size.
Size: 0x00000000FFFFFFFF
With this patch we allocate the file space for it. And
the size value is very large. I've changed the "Size" key to "ShSize" which
just overrides the value of `sh_size`. It keeps the logic of this test case
untouched and fixes the issue.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80629/new/
https://reviews.llvm.org/D80629
Files:
llvm/lib/ObjectYAML/ELFEmitter.cpp
llvm/test/tools/llvm-objcopy/ELF/preserve-segment-contents.test
llvm/test/tools/obj2yaml/ELF/program-headers.yaml
llvm/test/tools/yaml2obj/ELF/program-header-nobits.yaml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80629.269817.patch
Type: text/x-patch
Size: 13151 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200610/a28a55dd/attachment.bin>
More information about the llvm-commits
mailing list