aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt
diff options
context:
space:
mode:
authorGravatar bors[bot] <26634292+bors[bot]@users.noreply.github.com> 2019-10-28 20:56:31 +0000
committerGravatar GitHub <noreply@github.com> 2019-10-28 20:56:31 +0000
commit977e2bc8aae1c13e07a4f60d52b215e0e549bcd4 (patch)
tree7aebc70b26cfc0bfa6b842a91c7669a0b58c01a6 /cortex-m-rt
parent9214ddaf4044dc9710e520a83301200724ec1465 (diff)
parentc39053c87fa809b3505088fff0d936205386b534 (diff)
downloadcortex-m-977e2bc8aae1c13e07a4f60d52b215e0e549bcd4.tar.gz
cortex-m-977e2bc8aae1c13e07a4f60d52b215e0e549bcd4.tar.zst
cortex-m-977e2bc8aae1c13e07a4f60d52b215e0e549bcd4.zip
Merge #207
207: Rejig link.x to include more lables to help the linker lay out the ob… r=thejpster a=therealprof …jects Tested with 1.34.0 and 1.38.0 and careful inspection of the linker map generated on the previously failing https://github.com/rust-lang/rust/files/3722440/minimal-rust-lld-issue.zip Closes #188 (I believe) Closes https://github.com/rust-lang/rust/issues/65391 Signed-off-by: Daniel Egger <daniel@eggers-club.de> Co-authored-by: Daniel Egger <daniel@eggers-club.de>
Diffstat (limited to 'cortex-m-rt')
-rw-r--r--cortex-m-rt/link.x.in9
1 files changed, 6 insertions, 3 deletions
diff --git a/cortex-m-rt/link.x.in b/cortex-m-rt/link.x.in
index 1d05f16..30d4af1 100644
--- a/cortex-m-rt/link.x.in
+++ b/cortex-m-rt/link.x.in
@@ -88,10 +88,12 @@ SECTIONS
*(.text .text.*);
*(.HardFaultTrampoline);
*(.HardFault.*);
+ . = ALIGN(4);
+ __etext = .;
} > FLASH
/* ### .rodata */
- .rodata : ALIGN(4)
+ .rodata __etext : ALIGN(4)
{
*(.rodata .rodata.*);
@@ -99,18 +101,19 @@ SECTIONS
This is required by LLD to ensure the LMA of the following .data
section will have the correct alignment. */
. = ALIGN(4);
+ __erodata = .;
} > FLASH
/* ## Sections in RAM */
/* ### .data */
- .data : ALIGN(4)
+ .data : AT(__erodata) ALIGN(4)
{
. = ALIGN(4);
__sdata = .;
*(.data .data.*);
. = ALIGN(4); /* 4-byte align the end (VMA) of this section */
__edata = .;
- } > RAM AT > FLASH
+ } > RAM
/* LMA of .data */
__sidata = LOADADDR(.data);