summaryrefslogtreecommitdiffstats
path: root/ld/scripttempl/elfm68hc11.sc
diff options
context:
space:
mode:
Diffstat (limited to 'ld/scripttempl/elfm68hc11.sc')
-rw-r--r--ld/scripttempl/elfm68hc11.sc13
1 files changed, 13 insertions, 0 deletions
diff --git a/ld/scripttempl/elfm68hc11.sc b/ld/scripttempl/elfm68hc11.sc
index dc0956e4da..eaee371c9a 100644
--- a/ld/scripttempl/elfm68hc11.sc
+++ b/ld/scripttempl/elfm68hc11.sc
@@ -100,6 +100,7 @@ MEMORY
page0 (rwx) : ORIGIN = 0x0, LENGTH = 256
text (rx) : ORIGIN = ${ROM_START_ADDR}, LENGTH = ${ROM_SIZE}
data : ORIGIN = ${RAM_START_ADDR}, LENGTH = ${RAM_SIZE}
+ eeprom : ORIGIN = ${EEPROM_START_ADDR}, LENGTH = ${EEPROM_SIZE}
}
/* Setup the stack on the top of the data memory bank. */
@@ -165,6 +166,10 @@ BSS_DATA_RELOC="
.scommon 0 : { *(.scommon) }
"
+SOFT_REGS_RELOC="
+ .softregs 0 : { *(.softregs) }
+"
+
cat <<EOF
${RELOCATING+/* Linker script for 68HC11 executable (PROM). */}
${RELOCATING-/* Linker script for 68HC11 object file (ld -r). */}
@@ -294,6 +299,7 @@ SECTIONS
.page0 :
{
*(.page0)
+ ${RELOCATING+*(.softregs)}
} ${RELOCATING+ > page0}
/* Start of text section. */
@@ -393,6 +399,7 @@ SECTIONS
/* Relocation for some bss and data sections. */
${RELOCATING-${BSS_DATA_RELOC}}
+ ${RELOCATING-${SOFT_REGS_RELOC}}
.bss ${RELOCATING-0} :
{
@@ -410,6 +417,12 @@ SECTIONS
${RELOCATING+__bss_size = SIZEOF(.bss);}
${RELOCATING+PROVIDE (__bss_size = SIZEOF(.bss));}
+ .eeprom ${RELOCATING-0} :
+ {
+ *(.eeprom)
+ *(.eeprom.*)
+ } ${RELOCATING+ > ${EEPROM_MEMORY}}
+
${RELOCATING+${VECTORS}}
/* Stabs debugging sections. */
OpenPOWER on IntegriCloud