aboutsummaryrefslogtreecommitdiff
path: root/lib/lpc13xx/libopencm3_lpc13xx.ld
diff options
context:
space:
mode:
authorNicolas Schodet2012-09-03 19:49:47 +0200
committerNicolas Schodet2012-09-03 20:28:12 +0200
commit74cd991e7e8972cf22933743c847b5ce2b165798 (patch)
treece953690259f50a8f3606fc26006c3a221793289 /lib/lpc13xx/libopencm3_lpc13xx.ld
parent2a35377980a05b6eb7ed47e9979b0ff3849d749f (diff)
Use a specific symbol for data source address in flash
That way, data source address does not depend on any other unrelated change in linker script. This also fixes cases when .data input section is aligned on 8 bytes. The new version does not provide any address for the output section so that it is aligned to the strictest input section. The _data_loadaddr symbol will always take this alignment into account.
Diffstat (limited to 'lib/lpc13xx/libopencm3_lpc13xx.ld')
-rw-r--r--lib/lpc13xx/libopencm3_lpc13xx.ld1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/lpc13xx/libopencm3_lpc13xx.ld b/lib/lpc13xx/libopencm3_lpc13xx.ld
index a1892cd..3d683de 100644
--- a/lib/lpc13xx/libopencm3_lpc13xx.ld
+++ b/lib/lpc13xx/libopencm3_lpc13xx.ld
@@ -45,6 +45,7 @@ SECTIONS
. = ALIGN(4);
_edata = .;
} >ram AT >rom
+ _data_loadaddr = LOADADDR(.data);
.bss : {
*(.bss*) /* Read-write zero initialized data */