This is the mail archive of the binutils@sourceware.org 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]

MSP430: Add .data.* sections to linker script


Hi Guys,

  I am checking in the patch below to fix a small problem with the
  MSP430 linker scripts - they were not placing .data.* input sections
  into the .data output section.

Cheers
  Nick

ld/ChangeLog
2013-02-27  Nick Clifton  <nickc@redhat.com>

	* scripttempl/elf32msp430.sc: Add placement of .data.* sections.
	Add alignment of .bss section.
	* scripttempl/elf32msp430_3.sc: Likewise.

Index: ld/scripttempl/elf32msp430.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/elf32msp430.sc,v
retrieving revision 1.11
diff -u -3 -p -r1.11 elf32msp430.sc
--- ld/scripttempl/elf32msp430.sc	1 Aug 2012 01:03:47 -0000	1.11
+++ ld/scripttempl/elf32msp430.sc	27 Feb 2013 11:12:06 -0000
@@ -144,7 +144,7 @@ SECTIONS
     ${RELOCATING+ PROVIDE (__data_start = .) ; }
     ${RELOCATING+. = ALIGN(2);}
     *(.data)
-    ${RELOCATING+. = ALIGN(2);}
+    *(.data.*)
     *(.gnu.linkonce.d*)
     ${RELOCATING+. = ALIGN(2);}
     ${RELOCATING+ _edata = . ; }
@@ -177,6 +177,7 @@ SECTIONS
 
   .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
   {
+    ${RELOCATING+. = ALIGN(2);}
     ${RELOCATING+ PROVIDE (__bss_start = .) ; }
     *(.bss)
     *(COMMON)
Index: ld/scripttempl/elf32msp430_3.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/elf32msp430_3.sc,v
retrieving revision 1.9
diff -u -3 -p -r1.9 elf32msp430_3.sc
--- ld/scripttempl/elf32msp430_3.sc	1 Aug 2012 01:03:47 -0000	1.9
+++ ld/scripttempl/elf32msp430_3.sc	27 Feb 2013 11:12:06 -0000
@@ -118,7 +118,9 @@ SECTIONS
   .data ${RELOCATING-0} : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))}
   {  
     ${RELOCATING+ PROVIDE (__data_start = .) ; }
+    ${RELOCATING+. = ALIGN(2);}
     *(.data)
+    *(.data.*)
     *(.gnu.linkonce.d*)
     ${RELOCATING+. = ALIGN(2);}
     ${RELOCATING+ _edata = . ; }
@@ -126,6 +128,7 @@ SECTIONS
   
   .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
   {
+    ${RELOCATING+. = ALIGN(2);}
     ${RELOCATING+ PROVIDE (__bss_start = .) ; }
     *(.bss)
     *(COMMON)


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