From: Stephane Carrez Date: Sat, 29 Jun 2002 10:33:45 +0000 (+0000) Subject: * emulparams/m68hc12elfb.sh (EEPROM_MEMORY): Define. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a66c0f2c3bfeebc33e3beefc6eb9249fd3a3b486;p=binutils-gdb.git * 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. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 1866c2deb01..b7a99c41e58 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,15 @@ +2002-06-29 Stephane Carrez + + * 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. + 2002-06-26 John David Anglin * emulparams/hppa64linux.sh (OTHER_GOT_RELOC_SECTIONS): Add rela.opd diff --git a/ld/emulparams/m68hc11elf.sh b/ld/emulparams/m68hc11elf.sh index 2f6713e9dac..2a731794111 100644 --- a/ld/emulparams/m68hc11elf.sh +++ b/ld/emulparams/m68hc11elf.sh @@ -5,8 +5,11 @@ ROM_START_ADDR=0x08000 ROM_SIZE=0x8000 RAM_START_ADDR=0x01100 RAM_SIZE=0x6F00 +EEPROM_START_ADDR=0xb600 +EEPROM_SIZE=512 TEXT_MEMORY=text DATA_MEMORY=data +EEPROM_MEMORY=eeprom ARCH=m68hc11 MAXPAGESIZE=32 EMBEDDED=yes diff --git a/ld/emulparams/m68hc11elfb.sh b/ld/emulparams/m68hc11elfb.sh index 0f3016e2974..666f6dcb5df 100644 --- a/ld/emulparams/m68hc11elfb.sh +++ b/ld/emulparams/m68hc11elfb.sh @@ -3,6 +3,7 @@ SCRIPT_NAME=elfm68hc11 OUTPUT_FORMAT="elf32-m68hc11" TEXT_MEMORY=text DATA_MEMORY=data +EEPROM_MEMORY=eeprom ARCH=m68hc11 MAXPAGESIZE=32 GENERIC_BOARD=yes diff --git a/ld/emulparams/m68hc12elf.sh b/ld/emulparams/m68hc12elf.sh index 1d9134c17f2..133eb140288 100644 --- a/ld/emulparams/m68hc12elf.sh +++ b/ld/emulparams/m68hc12elf.sh @@ -5,8 +5,11 @@ ROM_START_ADDR=0x08000 ROM_SIZE=0x8000 RAM_START_ADDR=0x01100 RAM_SIZE=0x6F00 +EEPROM_START_ADDR=0x0800 +EEPROM_SIZE=2048 TEXT_MEMORY=text DATA_MEMORY=data +EEPROM_MEMORY=eeprom ARCH=m68hc12 MAXPAGESIZE=32 EMBEDDED=yes diff --git a/ld/emulparams/m68hc12elfb.sh b/ld/emulparams/m68hc12elfb.sh index 211978a3269..11a17b66109 100644 --- a/ld/emulparams/m68hc12elfb.sh +++ b/ld/emulparams/m68hc12elfb.sh @@ -3,6 +3,7 @@ SCRIPT_NAME=elfm68hc12 OUTPUT_FORMAT="elf32-m68hc12" TEXT_MEMORY=text DATA_MEMORY=data +EEPROM_MEMORY=eeprom ARCH=m68hc12 MAXPAGESIZE=32 GENERIC_BOARD=yes diff --git a/ld/scripttempl/elfm68hc11.sc b/ld/scripttempl/elfm68hc11.sc index dc0956e4dad..eaee371c9a5 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 < 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 a0bc4e0d0b6..2b25e775bb1 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 < ${EEPROM_MEMORY}} + ${RELOCATING+${VECTORS}} /* Stabs debugging sections. */