aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl
diff options
context:
space:
mode:
authorCatherine Moore <clm@redhat.com>1998-10-05 14:48:32 +0000
committerCatherine Moore <clm@redhat.com>1998-10-05 14:48:32 +0000
commit64923bb9474b75d1e4ff34c0597d414ce160d051 (patch)
treec75cc50ee62cae1833bbc8db0ae4180b0474bf9a /ld/scripttempl
parentd284b1f7c58fe01bef528b5905e22f7d7b7b1436 (diff)
downloadgdb-64923bb9474b75d1e4ff34c0597d414ce160d051.zip
gdb-64923bb9474b75d1e4ff34c0597d414ce160d051.tar.gz
gdb-64923bb9474b75d1e4ff34c0597d414ce160d051.tar.bz2
* ldmain.c (main): Error if --gc-sections and
dyanmic linking. * scripttempl/v850.sc: Add KEEP attribute to .init, .fini, .dtors and .ctors. Add .data and .text wildcards to support section garbage collection.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r--ld/scripttempl/v850.sc12
1 files changed, 7 insertions, 5 deletions
diff --git a/ld/scripttempl/v850.sc b/ld/scripttempl/v850.sc
index 4b6ac64..b4cda3a 100644
--- a/ld/scripttempl/v850.sc
+++ b/ld/scripttempl/v850.sc
@@ -55,11 +55,12 @@ SECTIONS
.rela.bss : { *(.rela.bss) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { *(.rela.plt) }
- .init : { *(.init) } =0
+ .init : { KEEP (*(.init)) } =0
.plt : { *(.plt) }
.text : {
*(.text)
+ ${RELOCATING+*(.text.*)}
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
*(.gnu.linkonce.t*)
@@ -83,25 +84,26 @@ SECTIONS
/* end-sanitize-v850e */
- .fini : { *(.fini) } =0
- .rodata : { *(.rodata) *(.gnu.linkonce.r*) }
+ .fini : { KEEP (*(.fini)) } =0
+ .rodata : { *(.rodata) ${RELOCATING+*(.rodata.*)} *(.gnu.linkonce.r*) }
.rodata1 : { *(.rodata1) }
.data : {
*(.data)
+ ${RELOCATING+*(.data.*)}
*(.gnu.linkonce.d*)
CONSTRUCTORS
}
.data1 : { *(.data1) }
.ctors : {
${RELOCATING+___ctors = .;}
- *(.ctors)
+ KEEP (*(.ctors))
${RELOCATING+___ctors_end = .;}
}
.dtors : {
${RELOCATING+___dtors = .;}
- *(.dtors)
+ KEEP (*(.dtors))
${RELOCATING+___dtors_end = .;}
}