aboutsummaryrefslogtreecommitdiff
path: root/lib/lpc43xx/libopencm3_lpc43xx_rom_to_ram.ld
diff options
context:
space:
mode:
authorMichael Ossmann2012-06-25 17:06:31 -0700
committerMichael Ossmann2012-06-25 17:06:31 -0700
commit7ef51e30e9a406789aca7b989e2c45e5a27e6e97 (patch)
treefc78b6fcdd55e540c3aa9446fb816282343b8d7f /lib/lpc43xx/libopencm3_lpc43xx_rom_to_ram.ld
parent94455ed1916ce378e97971201793397dcee5a924 (diff)
parent81317c02ab3c33e820fe4852c053476a33c6f834 (diff)
Merge pull request #9 from TitanMKD/master
Fixed Linker ROM to RAM
Diffstat (limited to 'lib/lpc43xx/libopencm3_lpc43xx_rom_to_ram.ld')
-rw-r--r--lib/lpc43xx/libopencm3_lpc43xx_rom_to_ram.ld16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/lpc43xx/libopencm3_lpc43xx_rom_to_ram.ld b/lib/lpc43xx/libopencm3_lpc43xx_rom_to_ram.ld
index f833aaf..0270ea8 100644
--- a/lib/lpc43xx/libopencm3_lpc43xx_rom_to_ram.ld
+++ b/lib/lpc43xx/libopencm3_lpc43xx_rom_to_ram.ld
@@ -36,7 +36,7 @@ SECTIONS
.text : {
. = ALIGN(0x400);
- _text_ram = . + ORIGIN(ram); /* Start of Code in RAM */
+ _text_ram = (. - ORIGIN(rom)) + ORIGIN(ram); /* Start of Code in RAM */
*(.vectors) /* Vector table */
*(.text*) /* Program code */
@@ -53,29 +53,29 @@ SECTIONS
__exidx_end = .;
_etext = .;
- _etext_ram = . + ORIGIN(ram);
- _etext_rom = . + ORIGIN(rom_flash);
-
- . = ORIGIN(ram);
+ _etext_ram = (. - ORIGIN(rom)) + ORIGIN(ram);
+ _etext_rom = (. - ORIGIN(rom)) + ORIGIN(rom_flash);
.data : {
_data = .;
*(.data*) /* Read-write initialized data */
. = ALIGN(4);
_edata = .;
- } >ram AT >rom
+ } >ram_data AT >rom
.bss : {
+ . = _edata;
*(.bss*) /* Read-write zero initialized data */
*(COMMON)
. = ALIGN(4);
_ebss = .;
- } >ram
+ } >ram_data
/* exception unwind data - required due to libgcc.a issuing /0 exceptions */
.ARM.extab : {
+ . = _ebss;
*(.ARM.extab*)
- } >ram
+ } >ram_data
/*
* The .eh_frame section appears to be used for C++ exception handling.