SHT_NOBITS are a bit special because occupy no physical space.
This patch adds support for them.
Details
Diff Detail
Event Timeline
I think I've found an issue in yaml2obj revealed by the test case I'd like to add here.
I'll investigate it in my tomorrow and update this patch after.
llvm/test/tools/obj2yaml/program-headers.yaml | ||
---|---|---|
482 | in a different | |
493 | Could you add some comments to these sections saying why the Address and Size values were chosen. It's not particularly clear to me how they're important to the test. | |
llvm/tools/obj2yaml/elf2yaml.cpp | ||
307 | "SHT_NOBITS sections usually occupy no physical space in a file. Such sections belong to a segment when they reside in the segment's virtual address space." I added the "usually" because I think a SHT_NOBITS section sandwiched between two non NOBITS sections might need to be allocated file space to avoid things pointing to the wrong place. |
- Addressed review comments.
Ready for review:
I feel that the dependency can be reversed, i.e. D77652 will depend on D77805.
Done.
In D77805#1972126, @grimar wrote:
I think I've found an issue in yaml2obj revealed by the test case I'd like to add here.
I'll investigate it in my tomorrow and update this patch after.It needs D78005 to be landed to proceed.
Let's go without an additional test case for now, the issue I was talking about is
related to trailing multiple SHT_NOBITS sections (fixed in D78005).
We can add it later.
in a different