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]

pr 6943, avr script


Setting .bss lma fixes the pr, the other changes are just tidying.

	PR 6943
	* scripttempl/avr.sc (.bss): Set lma when relocating.
	(.bss, .noinit): No need to set vma when relocating.
	(.text, .bss, ,noinit): Set vma to zero when not relocating.

Index: ld/scripttempl/avr.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/avr.sc,v
retrieving revision 1.5
diff -u -p -r1.5 avr.sc
--- ld/scripttempl/avr.sc	24 May 2006 07:36:12 -0000	1.5
+++ ld/scripttempl/avr.sc	5 Oct 2008 02:00:59 -0000
@@ -72,7 +72,7 @@ SECTIONS
   .rela.plt    ${RELOCATING-0} : { *(.rela.plt)		}
 
   /* Internal text space or external memory.  */
-  .text :
+  .text ${RELOCATING-0} :
   {
     *(.vectors)
     KEEP(*(.vectors))
@@ -168,7 +168,7 @@ SECTIONS
     ${RELOCATING+ PROVIDE (__data_end = .) ; }
   } ${RELOCATING+ > data}
 
-  .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
+  .bss ${RELOCATING-0} :${RELOCATING+ AT (ADDR (.bss))}
   {
     ${RELOCATING+ PROVIDE (__bss_start = .) ; }
     *(.bss)
@@ -181,7 +181,7 @@ SECTIONS
   ${RELOCATING+ __data_load_end = __data_load_start + SIZEOF(.data); }
 
   /* Global data not cleared after reset.  */
-  .noinit ${RELOCATING+ SIZEOF(.bss) + ADDR(.bss)} :
+  .noinit ${RELOCATING-0}:
   {
     ${RELOCATING+ PROVIDE (__noinit_start = .) ; }
     *(.noinit*)

-- 
Alan Modra
Australia Development Lab, IBM


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