This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] msp430 linker template add new anchors


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]