[PATCH] D114166: [ELF] Expand LMA region if output section alignment introduces padding
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 18 19:05:55 PST 2021
MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: lld/test/ELF/linkerscript/lma-align2.test:23
+MEMORY {
+ CODE (rx) : ORIGIN = 0x08000000, LENGTH = 100K
+ DATA (rw) : ORIGIN = 0x20000000, LENGTH = 100K
----------------
================
Comment at: lld/test/ELF/linkerscript/lma-align2.test:24
+ CODE (rx) : ORIGIN = 0x08000000, LENGTH = 100K
+ DATA (rw) : ORIGIN = 0x20000000, LENGTH = 100K
+}
----------------
================
Comment at: lld/test/ELF/linkerscript/lma-align2.test:29
+ .text : { *(.text) } > CODE
+ ## Aligning the start address of .data to 8 should also increase the location counter of CODE
+ .data : ALIGN(8) { . += 6; } > DATA AT> CODE
----------------
================
Comment at: lld/test/ELF/linkerscript/lma-align2.test:32
+ .data2 : { . += 8; } > CODE
+ ## Also an empty output section with an alignment requirement increases the location counter
+ .data3 : ALIGN(8) { . = ALIGN(. != 0 ? 4 : 1); } > DATA AT> CODE
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114166/new/
https://reviews.llvm.org/D114166
More information about the llvm-commits
mailing list