From f2f489ac6fb20fddeeac7824a7d217594fdc2a09 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 3 Dec 2003 10:44:50 +0000 Subject: [PATCH] (HEAP_SECTION_MSP430): New section for forthcoming devices. (_etext): provide this defenition for all scripts. --- ld/ChangeLog | 6 ++++++ ld/scripttempl/elf32msp430.sc | 25 ++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index edd3828b83d..3a4059bdb84 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2003-12-03 Dmitry Diky + + * scripttempl/elf32msp430.sc (HEAP_SECTION_MSP430): New section for + forthcoming devices. + (_etext): provide this defenition for all scripts. + 2003-12-02 Kazu Hirata * emultempl/beos.em: Remove ARGSUSED. diff --git a/ld/scripttempl/elf32msp430.sc b/ld/scripttempl/elf32msp430.sc index c3e78d32e6a..5754d662dcf 100644 --- a/ld/scripttempl/elf32msp430.sc +++ b/ld/scripttempl/elf32msp430.sc @@ -1,3 +1,23 @@ +#!/bin/sh + +HEAP_SECTION_MSP430=" " +HEAP_MEMORY_MSP430=" " + +if test ${GOT_HEAP_MSP-0} -ne 0 +then +HEAP_SECTION_MSP430=".heap ${RELOCATING-0} : + { + ${RELOCATING+ PROVIDE (__heap_data_start = .) ; } + *(.heap*) + ${RELOCATING+ PROVIDE (_heap_data_end = .) ; } + ${RELOCATING+. = ALIGN(2);} + ${RELOCATING+ PROVIDE (__heap_bottom = .) ; } + ${RELOCATING+ PROVIDE (__heap_top = ${HEAP_START} + ${HEAP_LENGTH}) ; } + } ${RELOCATING+ > heap}" +HEAP_MEMORY_MSP430="heap(rwx) : ORIGIN = $HEAP_START, LENGTH = $HEAP_LENGTH" +fi + + cat < text} .data ${RELOCATING-0} : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))} @@ -179,6 +200,7 @@ SECTIONS ${RELOCATING+ _vectors_end = . ; } } ${RELOCATING+ > vectors} + ${HEAP_SECTION_MSP430} /* Stabs debugging sections. */ .stab 0 : { *(.stab) } @@ -219,5 +241,6 @@ SECTIONS PROVIDE (__data_end_rom = _etext + SIZEOF (.data)) ; PROVIDE (__noinit_start_rom = _etext + SIZEOF (.data)) ; PROVIDE (__noinit_end_rom = _etext + SIZEOF (.data) + SIZEOF (.noinit)) ; + PROVIDE (__subdevice_has_heap = ${GOT_HEAP_MSP-0}) ; } EOF -- 2.30.2