diff options
Diffstat (limited to 'ld/scripttempl')
-rw-r--r-- | ld/scripttempl/elfm68hc11.sc | 13 | ||||
-rw-r--r-- | ld/scripttempl/elfm68hc12.sc | 12 |
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. */ |