If the dot gets moved by an explicit section address, an empty gap between sections could be created. The encompassing region for the section being parsed needs to be expanded to include the gap.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lld/test/ELF/linkerscript/section-gap-explicit-expr.test | ||
---|---|---|
7 ↗ | (On Diff #213256) | single-dash long options are discouraged in llvm-objdump. Use -h or --section-headers. I would use llvm-readelf -S. |
16 ↗ | (On Diff #213256) | ORIGIN(REGION) is not important in this test. You can just write: SECTIONS { .aaa_s 0 : { *(.aaa) } > REGION .bbb_s 0x14 : { *(.bbb) } > REGION } There is no need to copy out-of-order-section-in-region.test. How about renaming to memory-*? There are several memory region tests named memory-* now. It'd be ideal to have a single dedicated prefix for these tests. |
I have updated the diff and I believe I have addressed all concerns that were brought up.
I do not have commit access so if someone else could commit this patch for me I would appreciate it.
Understandable.
lld/test/ELF/linkerscript/memory-gap-explicit-expr.test | ||
---|---|---|
8 ↗ | (On Diff #213516) | I made it .aaa_s when debugging so that I could differentiate printouts referring to sections as defined in the "program" and sections as defined in the linker script. |
LGTM
I think this makes sense. Let me submit this tomorrow (I'm leaving now, and I don't want to take a risk to break buildbots.)