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: Mon, 10 Feb 2003 21:27:45 +0300
- Subject: [PATCH] msp430 linker template add new anchors.
- Organization: EIS
- Reply-to: diwil at mail dot ru
HI fellows,
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.
Force coping initial values of data in '.noinit' section to ROM.
* 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 10 Feb 2003 18:24:06 -0000
*************** SECTIONS
*** 132,138 ****
${RELOCATING+ _end = . ; }
} ${RELOCATING+ > data}
! .noinit ${RELOCATING+ SIZEOF(.bss) + ADDR(.bss)} :
{
${RELOCATING+ PROVIDE (__noinit_start = .) ; }
*(.noinit)
--- 132,138 ----
${RELOCATING+ _end = . ; }
} ${RELOCATING+ > data}
! .noinit ${RELOCATING+ SIZEOF(.bss) + ADDR(.bss)} : ${RELOCATING+AT (ADDR
(.text) + SIZEOF (.text) + SIZEOF(.data))}
{
${RELOCATING+ PROVIDE (__noinit_start = .) ; }
*(.noinit)
*************** 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 10 Feb 2003 18:24:06 -0000
*************** SECTIONS
*** 102,108 ****
${RELOCATING+ _end = . ; }
} ${RELOCATING+ > data}
! .noinit ${RELOCATING+ SIZEOF(.bss) + ADDR(.bss)} :
{
${RELOCATING+ PROVIDE (__noinit_start = .) ; }
*(.noinit)
--- 102,108 ----
${RELOCATING+ _end = . ; }
} ${RELOCATING+ > data}
! .noinit ${RELOCATING+ SIZEOF(.bss) + ADDR(.bss)} : ${RELOCATING+AT (ADDR
(.text) + SIZEOF (.text) + SIZEOF(.data))}
{
${RELOCATING+ PROVIDE (__noinit_start = .) ; }
*(.noinit)
*************** 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