From f265bc0660dd082e836fbd4416ddedce61b016d2 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sun, 5 Oct 2008 04:12:04 +0000 Subject: [PATCH] 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. --- ld/ChangeLog | 7 +++++++ ld/scripttempl/avr.sc | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index fc8345f84a..63563ddea9 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,10 @@ +2008-10-05 Alan Modra + + 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. + 2008-10-04 Alan Modra PR 6931 diff --git a/ld/scripttempl/avr.sc b/ld/scripttempl/avr.sc index 7368caf3d0..23b3046269 100644 --- a/ld/scripttempl/avr.sc +++ b/ld/scripttempl/avr.sc @@ -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*) -- 2.34.1