aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl/avr.sc
diff options
context:
space:
mode:
authorDenis Chertykov <chertykov@gmail.com>2016-01-25 22:33:25 +0300
committerDenis Chertykov <chertykov@gmail.com>2016-01-25 22:33:25 +0300
commit7585b2b8b643f4f20c25374f433081aee848e71f (patch)
treea71e879ca9202bdac78c4960b2a155a1dab1e11d /ld/scripttempl/avr.sc
parenta0f8e08a3c357ae24d3244940e1c6b405a0c17cc (diff)
downloadgdb-7585b2b8b643f4f20c25374f433081aee848e71f.zip
gdb-7585b2b8b643f4f20c25374f433081aee848e71f.tar.gz
gdb-7585b2b8b643f4f20c25374f433081aee848e71f.tar.bz2
Prevent .noinit section from incorrect placement for AVR.
When .data and .bss sections are empty .noinit section is placed at data region's start. This will be incorrect for devices that has different data start address than data region start in linker script. The patch updates .noinit section's VMA to end of .bss section. So, .noinit section will be placed at .data section address (-Tdata=<address>) when .data and .bss sections are empty. ld/ * scripttempl/avr.sc (.noinit): Force .noinit VMA to end of .bss VMA. * scripttempl/avrtiny.sc (.noinit): Likewise.
Diffstat (limited to 'ld/scripttempl/avr.sc')
-rw-r--r--ld/scripttempl/avr.sc2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/scripttempl/avr.sc b/ld/scripttempl/avr.sc
index de81987..c26f4ea 100644
--- a/ld/scripttempl/avr.sc
+++ b/ld/scripttempl/avr.sc
@@ -210,7 +210,7 @@ SECTIONS
${RELOCATING+ __data_load_end = __data_load_start + SIZEOF(.data); }
/* Global data not cleared after reset. */
- .noinit ${RELOCATING-0}:
+ .noinit ${RELOCATING+ ADDR(.bss) + SIZEOF (.bss)} ${RELOCATING-0}: ${RELOCATING+ AT (ADDR (.noinit))}
{
${RELOCATING+ PROVIDE (__noinit_start = .) ; }
*(.noinit*)