[obj2yaml] - Fix the issue with dumping empty sections when dumping program headers.
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. Differential revision: https://reviews.llvm.org/D77652
Loading
Please sign in to comment