From: Denis Chertykov Date: Tue, 8 Jul 2014 16:15:18 +0000 (+0400) Subject: * scripttempl/avr.sc: Remove KEEP for .data and X-Git-Tag: upstream/2.25~892 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b484180108158f427f3637987de02199416ed53a;p=platform%2Fupstream%2Flinaro-binutils.git * scripttempl/avr.sc: Remove KEEP for .data and force .bss VMA to end of .data VMA. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index c1ab4a1..279ece8 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2014-07-08 Senthil Kumar Selvaraj + + * scripttempl/avr.sc: Remove KEEP for .data and + force .bss VMA to end of .data VMA. + 2014-07-08 Will Newton * emulparams/armelf_linux.sh (TEXT_START_ADDR): Increase diff --git a/ld/scripttempl/avr.sc b/ld/scripttempl/avr.sc index 10714e1..d356b71 100644 --- a/ld/scripttempl/avr.sc +++ b/ld/scripttempl/avr.sc @@ -166,10 +166,7 @@ SECTIONS .data ${RELOCATING-0} : { ${RELOCATING+ PROVIDE (__data_start = .) ; } - /* --gc-sections will delete empty .data. This leads to wrong start - addresses for subsequent sections because -Tdata= from the command - line will have no effect, see PR13697. Thus, keep .data */ - KEEP (*(.data)) + *(.data) ${RELOCATING+ *(.data*)} *(.rodata) /* We need to include .rodata here if gcc is used */ ${RELOCATING+ *(.rodata*)} /* with -fdata-sections. */ @@ -179,7 +176,7 @@ SECTIONS ${RELOCATING+ PROVIDE (__data_end = .) ; } } ${RELOCATING+ > data ${RELOCATING+AT> text}} - .bss ${RELOCATING-0} :${RELOCATING+ AT (ADDR (.bss))} + .bss ${RELOCATING+ ADDR(.data) + SIZEOF (.data)} ${RELOCATING-0} :${RELOCATING+ AT (ADDR (.bss))} { ${RELOCATING+ PROVIDE (__bss_start = .) ; } *(.bss)