From 64923bb9474b75d1e4ff34c0597d414ce160d051 Mon Sep 17 00:00:00 2001 From: Catherine Moore Date: Mon, 5 Oct 1998 14:48:32 +0000 Subject: [PATCH] * 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. --- ld/ChangeLog | 8 ++++++++ ld/scripttempl/v850.sc | 12 +++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index f79d7d46df..b3f06a5968 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,11 @@ +Mon Oct 5 09:40:43 1998 Catherine Moore + + * 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. + Wed Sep 30 11:19:15 1998 Nick Clifton * scripttempl/v850.sc: Rename .call_table section to diff --git a/ld/scripttempl/v850.sc b/ld/scripttempl/v850.sc index 4b6ac643a6..b4cda3a3bb 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 = .;} }