[PATCH] D77652: [obj2yaml] - Fix the issue with dumping empty sections when dumping program headers.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 7 08:39:50 PDT 2020
grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Imagine we have:
ProgramHeaders:
- Type: PT_LOAD
Flags: [ PF_W, PF_R ]
Sections:
- Section: .bar
VAddr: 0x2000
Sections:
- Name: .foo
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Address: 0x1000
- Name: .bar
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Address: 0x2000
Both `.foo` and `.bar` share the same starting file offset,
but `VA(.foo)` < `VA(PT_LOAD)`, we should not include it into segment.
This patch fixes the issue.
https://reviews.llvm.org/D77652
Files:
llvm/test/Object/obj2yaml.test
llvm/test/tools/obj2yaml/program-headers.yaml
llvm/tools/obj2yaml/elf2yaml.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77652.255685.patch
Type: text/x-patch
Size: 4492 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200407/9f0b9423/attachment.bin>
More information about the llvm-commits
mailing list