This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] msp430 linker template add new anchors
- From: Dmitry <diwil at mail dot ru>
- To: binutils at sources dot redhat dot com
- Date: Tue, 4 Feb 2003 21:30:06 +0300
- Subject: [PATCH] msp430 linker template add new anchors
- Organization: EIS
- Reply-to: diwil at mail dot ru
HI fellows,
Some people found it usefull to have linker-defined constants which point to
data start/end locations in ROM, not in RAM for this embedded target.
The patch is below.
Cheers,
Dmitry.
[2003-02-04] Dmitry Diky <diwil@mail.ru>
* scripttempl/elf32msp430.sc: Add new data anchors defenitions.
* scripttempl/elf32msp430_3.sc: Likewise.
Index: scripttempl/elf32msp430.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/elf32msp430.sc,v
retrieving revision 1.1
diff -c -3 -p -r1.1 elf32msp430.sc
*** scripttempl/elf32msp430.sc 30 Dec 2002 19:25:05 -0000 1.1
--- scripttempl/elf32msp430.sc 4 Feb 2003 18:22:56 -0000
*************** SECTIONS
*** 184,188 ****
--- 184,192 ----
.debug_macinfo 0 : { *(.debug_macinfo) }
PROVIDE (__stack = ${STACK}) ;
+ PROVIDE (__data_start_rom = _etext) ;
+ PROVIDE (__data_end_rom = _etext + SIZEOF (.data)) ;
+ PROVIDE (__noinit_start_rom = _etext + SIZEOF (.data)) ;
+ PROVIDE (__noinit_end_rom = _etext + SIZEOF (.data) + SIZEOF (.noinit)) ;
}
EOF
Index: scripttempl/elf32msp430_3.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/elf32msp430_3.sc,v
retrieving revision 1.1
diff -c -3 -p -r1.1 elf32msp430_3.sc
*** scripttempl/elf32msp430_3.sc 30 Dec 2002 19:25:05 -0000 1.1
--- scripttempl/elf32msp430_3.sc 4 Feb 2003 18:22:56 -0000
*************** SECTIONS
*** 153,157 ****
--- 153,161 ----
.debug_macinfo 0 : { *(.debug_macinfo) }
PROVIDE (__stack = ${STACK}) ;
+ PROVIDE (__data_start_rom = _etext) ;
+ PROVIDE (__data_end_rom = _etext + SIZEOF (.data)) ;
+ PROVIDE (__noinit_start_rom = _etext + SIZEOF (.data)) ;
+ PROVIDE (__noinit_end_rom = _etext + SIZEOF (.data) + SIZEOF (.noinit)) ;
}
EOF