aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2012-06-07 16:53:10 +0000
committerNick Clifton <nickc@redhat.com>2012-06-07 16:53:10 +0000
commitfef632e18b6b6ff62fe93803650caba68fe9f33a (patch)
treeadee2cd9e5ac123f63c576249b6f80ea7b0b29de /ld/scripttempl
parent76e879f8e4be1acf21f9806f892c260379c003f8 (diff)
downloadgdb-fef632e18b6b6ff62fe93803650caba68fe9f33a.zip
gdb-fef632e18b6b6ff62fe93803650caba68fe9f33a.tar.gz
gdb-fef632e18b6b6ff62fe93803650caba68fe9f33a.tar.bz2
PR 13697
* scripttempl/avr.sc (.data): Keep it.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r--ld/scripttempl/avr.sc5
1 files changed, 4 insertions, 1 deletions
diff --git a/ld/scripttempl/avr.sc b/ld/scripttempl/avr.sc
index c11de86..478da38 100644
--- a/ld/scripttempl/avr.sc
+++ b/ld/scripttempl/avr.sc
@@ -161,7 +161,10 @@ SECTIONS
.data ${RELOCATING-0} : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))}
{
${RELOCATING+ PROVIDE (__data_start = .) ; }
- *(.data)
+ /* --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*)
*(.rodata) /* We need to include .rodata here if gcc is used */
*(.rodata*) /* with -fdata-sections. */