aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2002-06-29 10:33:45 +0000
committerStephane Carrez <stcarrez@nerim.fr>2002-06-29 10:33:45 +0000
commita66c0f2c3bfeebc33e3beefc6eb9249fd3a3b486 (patch)
tree0e4a131edcd03b140daec1452f49fe02c89be144 /ld/scripttempl
parent96e8741728f0825f7e7b903e66d0c9cc00dc2eb2 (diff)
downloadgdb-a66c0f2c3bfeebc33e3beefc6eb9249fd3a3b486.zip
gdb-a66c0f2c3bfeebc33e3beefc6eb9249fd3a3b486.tar.gz
gdb-a66c0f2c3bfeebc33e3beefc6eb9249fd3a3b486.tar.bz2
* emulparams/m68hc12elfb.sh (EEPROM_MEMORY): Define.
* emulparams/m68hc11elfb.sh (EEPROM_MEMORY): Define. * emulparams/m68hc11elf.sh (EEPROM_SIZE): Define. (EEPROM_START_ADDR): Define. (EEPROM_MEMORY): Define. * emulparams/m68hc12elf.sh: Likewise. * scripttempl/elfm68hc11.sc: Handle .eeprom section; handle .softregs section to put soft registers in .page0. * scripttempl/elfm68hc12.sc: Likewise but put soft registers in bss.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r--ld/scripttempl/elfm68hc11.sc13
-rw-r--r--ld/scripttempl/elfm68hc12.sc12
2 files changed, 25 insertions, 0 deletions
diff --git a/ld/scripttempl/elfm68hc11.sc b/ld/scripttempl/elfm68hc11.sc
index dc0956e..eaee371 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. */
diff --git a/ld/scripttempl/elfm68hc12.sc b/ld/scripttempl/elfm68hc12.sc
index a0bc4e0..2b25e77 100644
--- a/ld/scripttempl/elfm68hc12.sc
+++ b/ld/scripttempl/elfm68hc12.sc
@@ -165,6 +165,10 @@ BSS_DATA_RELOC="
.scommon 0 : { *(.scommon) }
"
+SOFT_REGS_RELOC="
+ .softregs 0 : { *(.softregs) }
+"
+
cat <<EOF
${RELOCATING+/* Linker script for 68HC12 executable (PROM). */}
${RELOCATING-/* Linker script for 68HC12 object file (ld -r). */}
@@ -393,10 +397,12 @@ SECTIONS
/* Relocation for some bss and data sections. */
${RELOCATING-${BSS_DATA_RELOC}}
+ ${RELOCATING-${SOFT_REGS_RELOC}}
.bss ${RELOCATING-0} :
{
${RELOCATING+__bss_start = .;}
+ ${RELOCATING+*(.softregs)}
${RELOCATING+*(.sbss)}
${RELOCATING+*(.scommon)}
@@ -410,6 +416,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. */