* scripttempl/elf32msp430.sc (.data): Set the based on the next
authorNick Clifton <nickc@redhat.com>
Wed, 20 Nov 2013 16:51:21 +0000 (16:51 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 20 Nov 2013 16:51:21 +0000 (16:51 +0000)
free location in the text memory region, not a computation based
upon the size of the text section.  Orphaned sections or other
linker scripts might insert new sections between the .text section
and the .data section.
* scripttempl/elf32msp430_3.sc (.data): Likewise.

ld/ChangeLog
ld/scripttempl/elf32msp430.sc
ld/scripttempl/elf32msp430_3.sc

index 2ea3b61..681a08b 100644 (file)
@@ -1,3 +1,12 @@
+2013-11-20  Nick Clifton  <nickc@redhat.com>
+
+       * scripttempl/elf32msp430.sc (.data): Set the based on the next
+       free location in the text memory region, not a computation based
+       upon the size of the text section.  Orphaned sections or other
+       linker scripts might insert new sections between the .text section
+       and the .data section.
+       * scripttempl/elf32msp430_3.sc (.data): Likewise.
+
 2013-11-19  Roland McGrath  <mcgrathr@google.com>
            Alan Modra  <amodra@gmail.com>
 
index c699a91..38df7a4 100644 (file)
@@ -222,8 +222,8 @@ SECTIONS
     ${RELOCATING+ _vectors_end = . ; }
   } ${RELOCATING+ > vectors}
 
-  .data ${RELOCATING-0} : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text) + SIZEOF (.rodata))}
-  {  
+  .data ${RELOCATING-0} :
+  {
     ${RELOCATING+ PROVIDE (__data_start = .) ; }
     ${RELOCATING+ PROVIDE (__datastart = .) ; }
     ${RELOCATING+. = ALIGN(2);}
@@ -242,7 +242,7 @@ SECTIONS
     *(.sdata .sdata.* .gnu.linkonce.s.*)
     ${RELOCATING+. = ALIGN(2);}
     ${RELOCATING+ _edata = . ; }
-  } ${RELOCATING+ > data}
+  } ${RELOCATING+ > data ${RELOCATING+AT> text}}
   
   .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
   {
index ade5fcb..7209f47 100644 (file)
@@ -124,7 +124,7 @@ SECTIONS
     *(.const:*)
   } ${RELOCATING+ > text}
 
-  .data ${RELOCATING-0} : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))}
+  .data ${RELOCATING-0} :
   {  
     ${RELOCATING+ PROVIDE (__data_start = .) ; }
     ${RELOCATING+. = ALIGN(2);}
@@ -133,7 +133,7 @@ SECTIONS
     *(.gnu.linkonce.d*)
     ${RELOCATING+. = ALIGN(2);}
     ${RELOCATING+ _edata = . ; }
-  } ${RELOCATING+ > data}
+  } ${RELOCATING+ > data ${RELOCATING+AT> text}}
   
   .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
   {