If both the MemRegion and LMARegion are set for an output section in a linker script, we should only increase the LMARegion if it is different from the MemRegion. Otherwise, we reserve the memory twice.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Overall looks good to me. Comments are below.
(I would rename the test from at8.s to at6.s though, since we do not have at6.s yet.)
test/ELF/linkerscript/at8.test | ||
---|---|---|
10 ↗ | (On Diff #158258) | We usually try to reduce the test cases. |
17 ↗ | (On Diff #158258) | Please add a brief comment describing what are you checking in this test case. I would also add a header to show what is 0000000020000000 and 001000. |
21 ↗ | (On Diff #158258) | I think this line does not make sense. All LOADs are always listed after the header: |
Address review comments.
This patch was split from https://reviews.llvm.org/D50052, which adds at6.test and at7.test
test/ELF/linkerscript/at8.test | ||
---|---|---|
11 ↗ | (On Diff #158276) | This seems to be equivalent to .text : { *(.text) } > RAM. What is the point of appending AT> RAM? |
test/ELF/linkerscript/at8.test | ||
---|---|---|
11 ↗ | (On Diff #158276) | If used together with the REGION_ALIAS feature, this becomes more clear. |