From 2f0b56c07dc063037f82a003c2146af0afe9b378 Mon Sep 17 00:00:00 2001 From: Denis Chertykov Date: Sat, 27 May 2000 15:36:58 +0000 Subject: [PATCH] * emulparams/avr1200.sh (STACK): Define as 0. * emulparams/avr23xx.sh (STACK): Define as last internal SRAM address. * emulparams/avr4433.sh (STACK): Likewise. * emulparams/avr44x4.sh (STACK): Likewise. * emulparams/avr85xx.sh (STACK): Likewise. * emulparams/avrmega103.sh (STACK): Likewise. * emulparams/avrmega161.sh (STACK): Likewise. * emulparams/avrmega603.sh (STACK): Likewise. * scripttempl/elf32avr.sc (__data_start): Define for gcrt1. (__stack): Define from ${STACK} for main(). --- ld/ChangeLog | 13 +++++++++++++ ld/emulparams/avr1200.sh | 1 + ld/emulparams/avr23xx.sh | 1 + ld/emulparams/avr4433.sh | 1 + ld/emulparams/avr44x4.sh | 1 + ld/emulparams/avr85xx.sh | 1 + ld/emulparams/avrmega103.sh | 4 ++-- ld/emulparams/avrmega161.sh | 1 + ld/emulparams/avrmega603.sh | 4 ++-- ld/scripttempl/elf32avr.sc | 2 ++ 10 files changed, 25 insertions(+), 4 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 5315bfd9f48..43684b4ee2e 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,16 @@ +2000-05-23 Marek Michalkiewicz + + * emulparams/avr1200.sh (STACK): Define as 0. + * emulparams/avr23xx.sh (STACK): Define as last internal SRAM address. + * emulparams/avr4433.sh (STACK): Likewise. + * emulparams/avr44x4.sh (STACK): Likewise. + * emulparams/avr85xx.sh (STACK): Likewise. + * emulparams/avrmega103.sh (STACK): Likewise. + * emulparams/avrmega161.sh (STACK): Likewise. + * emulparams/avrmega603.sh (STACK): Likewise. + * scripttempl/elf32avr.sc (__data_start): Define for gcrt1. + (__stack): Define from ${STACK} for main(). + 2000-05-26 Alan Modra * Makefile.am: Update dependencies with "make dep-am" diff --git a/ld/emulparams/avr1200.sh b/ld/emulparams/avr1200.sh index 5f833ade6dc..24607e5f6ff 100644 --- a/ld/emulparams/avr1200.sh +++ b/ld/emulparams/avr1200.sh @@ -9,3 +9,4 @@ TEMPLATE_NAME=generic TEXT_LENGTH=1K DATA_LENGTH=0 EEPROM_LENGTH=64 +STACK=0 diff --git a/ld/emulparams/avr23xx.sh b/ld/emulparams/avr23xx.sh index d8e45df9d4c..e85ef8621a9 100644 --- a/ld/emulparams/avr23xx.sh +++ b/ld/emulparams/avr23xx.sh @@ -9,4 +9,5 @@ TEMPLATE_NAME=generic TEXT_LENGTH=2K DATA_LENGTH=128 EEPROM_LENGTH=128 +STACK=0x0DF diff --git a/ld/emulparams/avr4433.sh b/ld/emulparams/avr4433.sh index 125a2036fd8..179fe1c6765 100644 --- a/ld/emulparams/avr4433.sh +++ b/ld/emulparams/avr4433.sh @@ -9,4 +9,5 @@ TEMPLATE_NAME=generic TEXT_LENGTH=4K DATA_LENGTH=128 EEPROM_LENGTH=256 +STACK=0x0DF diff --git a/ld/emulparams/avr44x4.sh b/ld/emulparams/avr44x4.sh index fb36aecb0ab..07fc57ec06e 100644 --- a/ld/emulparams/avr44x4.sh +++ b/ld/emulparams/avr44x4.sh @@ -9,4 +9,5 @@ TEMPLATE_NAME=generic TEXT_LENGTH=4K DATA_LENGTH=256 EEPROM_LENGTH=256 +STACK=0x15F diff --git a/ld/emulparams/avr85xx.sh b/ld/emulparams/avr85xx.sh index fef39795b2c..f3700bd8c36 100644 --- a/ld/emulparams/avr85xx.sh +++ b/ld/emulparams/avr85xx.sh @@ -9,4 +9,5 @@ TEMPLATE_NAME=generic TEXT_LENGTH=8K DATA_LENGTH=512 EEPROM_LENGTH=512 +STACK=0x25F diff --git a/ld/emulparams/avrmega103.sh b/ld/emulparams/avrmega103.sh index e727e8ba561..ca5a61e54b5 100644 --- a/ld/emulparams/avrmega103.sh +++ b/ld/emulparams/avrmega103.sh @@ -7,6 +7,6 @@ EMBEDDED=yes TEMPLATE_NAME=generic TEXT_LENGTH=128K -DATA_LENGTH=4K +DATA_LENGTH=4000 EEPROM_LENGTH=4K - +STACK=0x0FFF diff --git a/ld/emulparams/avrmega161.sh b/ld/emulparams/avrmega161.sh index 6319892b56a..d92cc188551 100644 --- a/ld/emulparams/avrmega161.sh +++ b/ld/emulparams/avrmega161.sh @@ -9,4 +9,5 @@ TEMPLATE_NAME=generic TEXT_LENGTH=16K DATA_LENGTH=1K EEPROM_LENGTH=512 +STACK=0x45F diff --git a/ld/emulparams/avrmega603.sh b/ld/emulparams/avrmega603.sh index 1b7d14b4bde..4d60895650c 100644 --- a/ld/emulparams/avrmega603.sh +++ b/ld/emulparams/avrmega603.sh @@ -7,6 +7,6 @@ EMBEDDED=yes TEMPLATE_NAME=generic TEXT_LENGTH=64K -DATA_LENGTH=4K +DATA_LENGTH=4000 EEPROM_LENGTH=2K - +STACK=0x0FFF diff --git a/ld/scripttempl/elf32avr.sc b/ld/scripttempl/elf32avr.sc index 51b6512bf7f..36e99dafe31 100644 --- a/ld/scripttempl/elf32avr.sc +++ b/ld/scripttempl/elf32avr.sc @@ -88,6 +88,7 @@ SECTIONS .data ${RELOCATING-0} : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))} { + ${RELOCATING+ PROVIDE (__data_start = .) ; } *(.data) *(.gnu.linkonce.d*) ${RELOCATING+. = ALIGN(2);} @@ -144,6 +145,7 @@ SECTIONS .debug_loc 0 : { *(.debug_loc) } .debug_macinfo 0 : { *(.debug_macinfo) } + PROVIDE (__stack = ${STACK}) ; } EOF -- 2.30.2