From df381c72f46873ac16530442ac11b160009bcba8 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 28 Sep 2009 07:08:50 +0000 Subject: [PATCH] * scripttempl/elf32cr16.sc: Emit empty script for ld -r and ld -Ur. * scripttempl/elf32cr16c.sc: Likewise. * scripttempl/elf32crx.sc: Likewise. * scripttempl/tic54xcoff.sc: Likewise. * scripttempl/aix.sc: Delete ${RELOCATING-0}. * scripttempl/avr.sc: Likewise. * scripttempl/elf32msp430.sc: Likewise. * scripttempl/elf32msp430_3.sc: Likewise. * scripttempl/elf32sh-symbian.sc: Likewise. * scripttempl/elf_chaos.sc: Likewise. * scripttempl/elfi370.sc: Likewise. * scripttempl/nw.sc: Likewise. * scripttempl/psos.sc: Likewise. * scripttempl/armbpabi.sc: Delete ${RELOCATING-0} and ${CONSTRUCTING-0}. * scripttempl/elf.sc: Likewise. * scripttempl/elf64hppa.sc: Likewise. * scripttempl/elfd10v.sc: Likewise. * scripttempl/elfd30v.sc: Likewise. * scripttempl/elfm68hc11.sc: Likewise. * scripttempl/elfm68hc12.sc: Likewise. * scripttempl/elfmicroblaze.sc: Likewise. * scripttempl/elfxtensa.sc: Likewise. * scripttempl/iq2000.sc: Likewise. * scripttempl/mep.sc: Likewise. * scripttempl/xstormy16.sc: Likewise. --- ld/ChangeLog | 27 ++++++ ld/scripttempl/aix.sc | 2 +- ld/scripttempl/armbpabi.sc | 72 +++++++-------- ld/scripttempl/avr.sc | 64 +++++++------- ld/scripttempl/elf.sc | 180 +++++++++++++++++++------------------- ld/scripttempl/elf32cr16.sc | 3 +- ld/scripttempl/elf32cr16c.sc | 3 +- ld/scripttempl/elf32crx.sc | 3 +- ld/scripttempl/elf32msp430.sc | 66 +++++++------- ld/scripttempl/elf32msp430_3.sc | 58 ++++++------ ld/scripttempl/elf32sh-symbian.sc | 78 ++++++++--------- ld/scripttempl/elf64hppa.sc | 172 ++++++++++++++++++------------------ ld/scripttempl/elf_chaos.sc | 108 +++++++++++------------ ld/scripttempl/elfd10v.sc | 20 ++--- ld/scripttempl/elfd30v.sc | 128 +++++++++++++-------------- ld/scripttempl/elfi370.sc | 92 ++++++++++--------- ld/scripttempl/elfm68hc11.sc | 152 ++++++++++++++++---------------- ld/scripttempl/elfm68hc12.sc | 152 ++++++++++++++++---------------- ld/scripttempl/elfmicroblaze.sc | 4 +- ld/scripttempl/elfxtensa.sc | 174 ++++++++++++++++++------------------ ld/scripttempl/iq2000.sc | 110 +++++++++++------------ ld/scripttempl/mep.sc | 150 ++++++++++++++++--------------- ld/scripttempl/nw.sc | 75 ++++++++-------- ld/scripttempl/psos.sc | 6 +- ld/scripttempl/tic54xcoff.sc | 3 +- ld/scripttempl/xstormy16.sc | 22 ++--- 26 files changed, 956 insertions(+), 968 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index b641071..45e2a97 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,30 @@ +2009-09-28 Alan Modra + + * scripttempl/elf32cr16.sc: Emit empty script for ld -r and ld -Ur. + * scripttempl/elf32cr16c.sc: Likewise. + * scripttempl/elf32crx.sc: Likewise. + * scripttempl/aix.sc: Delete ${RELOCATING-0}. + * scripttempl/avr.sc: Likewise. + * scripttempl/elf32msp430.sc: Likewise. + * scripttempl/elf32msp430_3.sc: Likewise. + * scripttempl/elf32sh-symbian.sc: Likewise. + * scripttempl/elf_chaos.sc: Likewise. + * scripttempl/elfi370.sc: Likewise. + * scripttempl/nw.sc: Likewise. + * scripttempl/psos.sc: Likewise. + * scripttempl/armbpabi.sc: Delete ${RELOCATING-0} and ${CONSTRUCTING-0}. + * scripttempl/elf.sc: Likewise. + * scripttempl/elf64hppa.sc: Likewise. + * scripttempl/elfd10v.sc: Likewise. + * scripttempl/elfd30v.sc: Likewise. + * scripttempl/elfm68hc11.sc: Likewise. + * scripttempl/elfm68hc12.sc: Likewise. + * scripttempl/elfmicroblaze.sc: Likewise. + * scripttempl/elfxtensa.sc: Likewise. + * scripttempl/iq2000.sc: Likewise. + * scripttempl/mep.sc: Likewise. + * scripttempl/xstormy16.sc: Likewise. + 2009-09-27 Christopher Faylor * ldlang.c (lang_size_sections_1): Always force output vma to zero for diff --git a/ld/scripttempl/aix.sc b/ld/scripttempl/aix.sc index d592dbe..722e337 100644 --- a/ld/scripttempl/aix.sc +++ b/ld/scripttempl/aix.sc @@ -12,7 +12,7 @@ SECTIONS .pad 0 : { *(.pad) } . = 0x10000000; - .text ${RELOCATING-0} : { + .text : { ${RELOCATING+PROVIDE (_text = .);} *(.text) *(.pr) diff --git a/ld/scripttempl/armbpabi.sc b/ld/scripttempl/armbpabi.sc index 90da2ed..5eacc44 100644 --- a/ld/scripttempl/armbpabi.sc +++ b/ld/scripttempl/armbpabi.sc @@ -27,12 +27,12 @@ if test -n "${COMMONPAGESIZE}"; then fi fi INTERP=".interp 0 : { *(.interp) }" -PLT=".plt ${RELOCATING-0} : { *(.plt) }" -RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }" +PLT=".plt : { *(.plt) }" +RODATA=".rodata : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }" DATARELRO=".data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) }" DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }" if test -z "${NO_SMALL_DATA}"; then - SBSS=".sbss ${RELOCATING-0} : + SBSS=".sbss : { ${RELOCATING+PROVIDE (__sbss_start = .);} ${RELOCATING+PROVIDE (___sbss_start = .);} @@ -42,29 +42,29 @@ if test -z "${NO_SMALL_DATA}"; then ${RELOCATING+PROVIDE (__sbss_end = .);} ${RELOCATING+PROVIDE (___sbss_end = .);} }" - SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }" + SBSS2=".sbss2 : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }" SDATA="/* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ - .sdata ${RELOCATING-0} : + .sdata : { ${RELOCATING+${SDATA_START_SYMBOLS}} *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*}) }" - SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*}) }" - REL_SDATA=".rel.sdata ${RELOCATING-0} : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) } - .rela.sdata ${RELOCATING-0} : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }" - REL_SBSS=".rel.sbss ${RELOCATING-0} : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) } - .rela.sbss ${RELOCATING-0} : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }" - REL_SDATA2=".rel.sdata2 ${RELOCATING-0} : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) } - .rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }" - REL_SBSS2=".rel.sbss2 ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) } - .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }" + SDATA2=".sdata2 : { *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*}) }" + REL_SDATA=".rel.sdata : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) } + .rela.sdata : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }" + REL_SBSS=".rel.sbss : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) } + .rela.sbss : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }" + REL_SDATA2=".rel.sdata2 : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) } + .rela.sdata2 : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }" + REL_SBSS2=".rel.sbss2 : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) } + .rela.sbss2 : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }" else NO_SMALL_DATA=" " fi test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" " -CTOR=".ctors ${CONSTRUCTING-0} : +CTOR=".ctors : { ${CONSTRUCTING+${CTOR_START}} /* gcc uses crtbegin.o to find the start of @@ -90,7 +90,7 @@ CTOR=".ctors ${CONSTRUCTING-0} : KEEP (*(.ctors)) ${CONSTRUCTING+${CTOR_END}} }" -DTOR=".dtors ${CONSTRUCTING-0} : +DTOR=".dtors : { ${CONSTRUCTING+${DTOR_START}} KEEP (*crtbegin.o(.dtors)) @@ -100,7 +100,7 @@ DTOR=".dtors ${CONSTRUCTING-0} : KEEP (*(.dtors)) ${CONSTRUCTING+${DTOR_END}} }" -STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} : +STACK=" .stack ${RELOCATING+${STACK_ADDR}} : { ${RELOCATING+_stack = .;} *(.stack) @@ -131,10 +131,6 @@ ${RELOCATING+/* Do we need any of these for elf? __DYNAMIC = 0; ${STACKZERO+${STACKZERO}} ${SHLIB_PATH+${SHLIB_PATH}} */} ${RELOCATING+${EXECUTABLE_SYMBOLS}} ${RELOCATING+${INPUT_FILES}} -${RELOCATING- /* For some reason, the Solaris linker makes bad executables - if gld -r is used and the intermediate file has sections starting - at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld - bug. But for now assigning the zero vmas works. */} /* ARM's proprietary toolchain generate these symbols to match the start and end of particular sections of the image. SymbianOS uses these @@ -173,13 +169,13 @@ SECTIONS EOF cat < text} - .data ${RELOCATING-0} : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))} + .data : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))} { ${RELOCATING+ PROVIDE (__data_start = .) ; } *(.data) @@ -168,7 +168,7 @@ SECTIONS ${RELOCATING+ PROVIDE (__data_end = .) ; } } ${RELOCATING+ > data} - .bss ${RELOCATING-0} :${RELOCATING+ AT (ADDR (.bss))} + .bss :${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-0}: + .noinit : { ${RELOCATING+ PROVIDE (__noinit_start = .) ; } *(.noinit*) @@ -190,7 +190,7 @@ SECTIONS ${RELOCATING+ PROVIDE (__heap_start = .) ; } } ${RELOCATING+ > data} - .eeprom ${RELOCATING-0}: + .eeprom : { *(.eeprom*) ${RELOCATING+ __eeprom_end = . ; } diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index 886f578..dc2bd3d 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -110,42 +110,42 @@ if test -n "${COMMONPAGESIZE}"; then DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);" fi if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}"; then - INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }" + INITIAL_READONLY_SECTIONS=".interp : { *(.interp) }" fi if test -z "$PLT"; then - IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }" - PLT=".plt ${RELOCATING-0} : { *(.plt)${IREL_IN_PLT+ *(.iplt)} } + IPLT=".iplt : { *(.iplt) }" + PLT=".plt : { *(.plt)${IREL_IN_PLT+ *(.iplt)} } ${IREL_IN_PLT-$IPLT}" fi test -n "${DATA_PLT-${BSS_PLT-text}}" && TEXT_PLT=yes if test -z "$GOT"; then if test -z "$SEPARATE_GOTPLT"; then - GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) }" + GOT=".got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) }" else - GOT=".got ${RELOCATING-0} : { *(.got) *(.igot) }" - GOTPLT=".got.plt ${RELOCATING-0} : { *(.got.plt) *(.igot.plt) }" + GOT=".got : { *(.got) *(.igot) }" + GOTPLT=".got.plt : { *(.got.plt) *(.igot.plt) }" fi fi -REL_IFUNC=".rel.ifunc ${RELOCATING-0} : { *(.rel.ifunc) }" -RELA_IFUNC=".rela.ifunc ${RELOCATING-0} : { *(.rela.ifunc) }" -REL_IPLT=".rel.iplt ${RELOCATING-0} : +REL_IFUNC=".rel.ifunc : { *(.rel.ifunc) }" +RELA_IFUNC=".rela.ifunc : { *(.rela.ifunc) }" +REL_IPLT=".rel.iplt : { ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__rel_iplt_start = .);}} *(.rel.iplt) ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__rel_iplt_end = .);}} }" -RELA_IPLT=".rela.iplt ${RELOCATING-0} : +RELA_IPLT=".rela.iplt : { ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__rela_iplt_start = .);}} *(.rela.iplt) ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__rela_iplt_end = .);}} }" -DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }" -RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }" +DYNAMIC=".dynamic : { *(.dynamic) }" +RODATA=".rodata : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }" DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }" DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }" if test -z "${NO_SMALL_DATA}"; then - SBSS=".sbss ${RELOCATING-0} : + SBSS=".sbss : { ${RELOCATING+${SBSS_START_SYMBOLS}} ${CREATE_SHLIB+*(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)} @@ -154,29 +154,29 @@ if test -z "${NO_SMALL_DATA}"; then *(.scommon) ${RELOCATING+${SBSS_END_SYMBOLS}} }" - SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }" + SBSS2=".sbss2 : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }" SDATA="/* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ - .sdata ${RELOCATING-0} : + .sdata : { ${RELOCATING+${SDATA_START_SYMBOLS}} ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)} *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*}) }" - SDATA2=".sdata2 ${RELOCATING-0} : + SDATA2=".sdata2 : { ${RELOCATING+${SDATA2_START_SYMBOLS}} *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*}) }" - REL_SDATA=".rel.sdata ${RELOCATING-0} : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) } - .rela.sdata ${RELOCATING-0} : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }" - REL_SBSS=".rel.sbss ${RELOCATING-0} : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) } - .rela.sbss ${RELOCATING-0} : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }" - REL_SDATA2=".rel.sdata2 ${RELOCATING-0} : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) } - .rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }" - REL_SBSS2=".rel.sbss2 ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) } - .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }" + REL_SDATA=".rel.sdata : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) } + .rela.sdata : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }" + REL_SBSS=".rel.sbss : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) } + .rela.sbss : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }" + REL_SDATA2=".rel.sdata2 : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) } + .rela.sdata2 : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }" + REL_SBSS2=".rel.sbss2 : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) } + .rela.sbss2 : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }" else NO_SMALL_DATA=" " fi @@ -192,31 +192,31 @@ if test -z "${SDATA_GOT}"; then fi test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" " test "${LARGE_SECTIONS}" = "yes" && REL_LARGE=" - .rel.ldata ${RELOCATING-0} : { *(.rel.ldata${RELOCATING+ .rel.ldata.* .rel.gnu.linkonce.l.*}) } - .rela.ldata ${RELOCATING-0} : { *(.rela.ldata${RELOCATING+ .rela.ldata.* .rela.gnu.linkonce.l.*}) } - .rel.lbss ${RELOCATING-0} : { *(.rel.lbss${RELOCATING+ .rel.lbss.* .rel.gnu.linkonce.lb.*}) } - .rela.lbss ${RELOCATING-0} : { *(.rela.lbss${RELOCATING+ .rela.lbss.* .rela.gnu.linkonce.lb.*}) } - .rel.lrodata ${RELOCATING-0} : { *(.rel.lrodata${RELOCATING+ .rel.lrodata.* .rel.gnu.linkonce.lr.*}) } - .rela.lrodata ${RELOCATING-0} : { *(.rela.lrodata${RELOCATING+ .rela.lrodata.* .rela.gnu.linkonce.lr.*}) }" + .rel.ldata : { *(.rel.ldata${RELOCATING+ .rel.ldata.* .rel.gnu.linkonce.l.*}) } + .rela.ldata : { *(.rela.ldata${RELOCATING+ .rela.ldata.* .rela.gnu.linkonce.l.*}) } + .rel.lbss : { *(.rel.lbss${RELOCATING+ .rel.lbss.* .rel.gnu.linkonce.lb.*}) } + .rela.lbss : { *(.rela.lbss${RELOCATING+ .rela.lbss.* .rela.gnu.linkonce.lb.*}) } + .rel.lrodata : { *(.rel.lrodata${RELOCATING+ .rel.lrodata.* .rel.gnu.linkonce.lr.*}) } + .rela.lrodata : { *(.rela.lrodata${RELOCATING+ .rela.lrodata.* .rela.gnu.linkonce.lr.*}) }" test "${LARGE_SECTIONS}" = "yes" && OTHER_BSS_SECTIONS=" ${OTHER_BSS_SECTIONS} - .lbss ${RELOCATING-0} : + .lbss : { *(.dynlbss) *(.lbss${RELOCATING+ .lbss.* .gnu.linkonce.lb.*}) *(LARGE_COMMON) }" test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS=" - .lrodata ${RELOCATING-0} ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} : + .lrodata ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} : { *(.lrodata${RELOCATING+ .lrodata.* .gnu.linkonce.lr.*}) } - .ldata ${RELOCATING-0} ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} : + .ldata ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} : { *(.ldata${RELOCATING+ .ldata.* .gnu.linkonce.l.*}) ${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);} }" -CTOR=".ctors ${CONSTRUCTING-0} : +CTOR=".ctors : { ${CONSTRUCTING+${CTOR_START}} /* gcc uses crtbegin.o to find the start of @@ -242,7 +242,7 @@ CTOR=".ctors ${CONSTRUCTING-0} : KEEP (*(.ctors)) ${CONSTRUCTING+${CTOR_END}} }" -DTOR=".dtors ${CONSTRUCTING-0} : +DTOR=".dtors : { ${CONSTRUCTING+${DTOR_START}} KEEP (*crtbegin.o(.dtors)) @@ -252,7 +252,7 @@ DTOR=".dtors ${CONSTRUCTING-0} : KEEP (*(.dtors)) ${CONSTRUCTING+${DTOR_END}} }" -STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} : +STACK=" .stack ${RELOCATING+${STACK_ADDR}} : { ${RELOCATING+${USER_LABEL_PREFIX}_stack = .;} *(.stack) @@ -277,10 +277,6 @@ ${RELOCATING+ENTRY(${ENTRY})} ${RELOCATING+${LIB_SEARCH_DIRS}} ${RELOCATING+${EXECUTABLE_SYMBOLS}} ${RELOCATING+${INPUT_FILES}} -${RELOCATING- /* For some reason, the Solaris linker makes bad executables - if gld -r is used and the intermediate file has sections starting - at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld - bug. But for now assigning the zero vmas works. */} SECTIONS { @@ -296,13 +292,13 @@ test -n "${RELOCATING+0}" || unset NON_ALLOC_DYN test -z "${NON_ALLOC_DYN}" || TEXT_DYNAMIC= cat > ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ cat >> ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ @@ -366,14 +362,14 @@ EOF fi cat >> ldscripts/dyntmp.$$ < text} - .data ${RELOCATING-0} : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))} + .data : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))} { ${RELOCATING+ PROVIDE (__data_start = .) ; } ${RELOCATING+. = ALIGN(2);} @@ -151,7 +151,7 @@ SECTIONS } ${RELOCATING+ > data} /* Bootloader. */ - .bootloader ${RELOCATING-0} : + .bootloader : { ${RELOCATING+ PROVIDE (__boot_start = .) ; } *(.bootloader) @@ -160,7 +160,7 @@ SECTIONS } ${RELOCATING+ > bootloader} /* Information memory. */ - .infomem ${RELOCATING-0} : + .infomem : { *(.infomem) ${RELOCATING+. = ALIGN(2);} @@ -168,7 +168,7 @@ SECTIONS } ${RELOCATING+ > infomem} /* Information memory (not loaded into MPU). */ - .infomemnobits ${RELOCATING-0} : + .infomemnobits : { *(.infomemnobits) ${RELOCATING+. = ALIGN(2);} @@ -193,7 +193,7 @@ SECTIONS ${RELOCATING+ _end = . ; } } ${RELOCATING+ > data} - .vectors ${RELOCATING-0}: + .vectors : { ${RELOCATING+ PROVIDE (__vectors_start = .) ; } *(.vectors*) diff --git a/ld/scripttempl/elf32msp430_3.sc b/ld/scripttempl/elf32msp430_3.sc index 15eb517..66c8775 100644 --- a/ld/scripttempl/elf32msp430_3.sc +++ b/ld/scripttempl/elf32msp430_3.sc @@ -13,63 +13,63 @@ SECTIONS { /* Read-only sections, merged into text segment. */ ${TEXT_DYNAMIC+${DYNAMIC}} - .hash ${RELOCATING-0} : { *(.hash) } - .dynsym ${RELOCATING-0} : { *(.dynsym) } - .dynstr ${RELOCATING-0} : { *(.dynstr) } - .gnu.version ${RELOCATING-0} : { *(.gnu.version) } - .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) } - .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) } - - .rel.init ${RELOCATING-0} : { *(.rel.init) } - .rela.init ${RELOCATING-0} : { *(.rela.init) } - .rel.text ${RELOCATING-0} : + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + + .rel.init : { *(.rel.init) } + .rela.init : { *(.rela.init) } + .rel.text : { *(.rel.text) ${RELOCATING+*(.rel.text.*)} ${RELOCATING+*(.rel.gnu.linkonce.t*)} } - .rela.text ${RELOCATING-0} : + .rela.text : { *(.rela.text) ${RELOCATING+*(.rela.text.*)} ${RELOCATING+*(.rela.gnu.linkonce.t*)} } - .rel.fini ${RELOCATING-0} : { *(.rel.fini) } - .rela.fini ${RELOCATING-0} : { *(.rela.fini) } - .rel.rodata ${RELOCATING-0} : + .rel.fini : { *(.rel.fini) } + .rela.fini : { *(.rela.fini) } + .rel.rodata : { *(.rel.rodata) ${RELOCATING+*(.rel.rodata.*)} ${RELOCATING+*(.rel.gnu.linkonce.r*)} } - .rela.rodata ${RELOCATING-0} : + .rela.rodata : { *(.rela.rodata) ${RELOCATING+*(.rela.rodata.*)} ${RELOCATING+*(.rela.gnu.linkonce.r*)} } - .rel.data ${RELOCATING-0} : + .rel.data : { *(.rel.data) ${RELOCATING+*(.rel.data.*)} ${RELOCATING+*(.rel.gnu.linkonce.d*)} } - .rela.data ${RELOCATING-0} : + .rela.data : { *(.rela.data) ${RELOCATING+*(.rela.data.*)} ${RELOCATING+*(.rela.gnu.linkonce.d*)} } - .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) } - .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) } - .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) } - .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) } - .rel.got ${RELOCATING-0} : { *(.rel.got) } - .rela.got ${RELOCATING-0} : { *(.rela.got) } - .rel.bss ${RELOCATING-0} : { *(.rel.bss) } - .rela.bss ${RELOCATING-0} : { *(.rela.bss) } - .rel.plt ${RELOCATING-0} : { *(.rel.plt) } - .rela.plt ${RELOCATING-0} : { *(.rela.plt) } + .rel.ctors : { *(.rel.ctors) } + .rela.ctors : { *(.rela.ctors) } + .rel.dtors : { *(.rel.dtors) } + .rela.dtors : { *(.rela.dtors) } + .rel.got : { *(.rel.got) } + .rela.got : { *(.rela.got) } + .rel.bss : { *(.rel.bss) } + .rela.bss : { *(.rela.bss) } + .rel.plt : { *(.rel.plt) } + .rela.plt : { *(.rela.plt) } /* Internal text space. */ .text : @@ -115,7 +115,7 @@ SECTIONS ${RELOCATING+ _etext = . ; } } ${RELOCATING+ > text} - .data ${RELOCATING-0} : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))} + .data : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))} { ${RELOCATING+ PROVIDE (__data_start = .) ; } *(.data) @@ -142,7 +142,7 @@ SECTIONS ${RELOCATING+ _end = . ; } } ${RELOCATING+ > data} - .vectors ${RELOCATING-0}: + .vectors : { ${RELOCATING+ PROVIDE (__vectors_start = .) ; } *(.vectors*) diff --git a/ld/scripttempl/elf32sh-symbian.sc b/ld/scripttempl/elf32sh-symbian.sc index a0b6a4f..c8e3cf7 100644 --- a/ld/scripttempl/elf32sh-symbian.sc +++ b/ld/scripttempl/elf32sh-symbian.sc @@ -84,7 +84,7 @@ fi DYNAMIC=".dynamic : { *(.dynamic) } :dynamic :dyn" RODATA=".rodata ALIGN(4) : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }" DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.directive) *(.gnu.lto_*) }" -test -z "$GOT" && GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.got) } :dynamic :dyn" +test -z "$GOT" && GOT=".got : { *(.got.plt) *(.got) } :dynamic :dyn" CTOR=".ctors ALIGN(4) : { ${CONSTRUCTING+${CTOR_START}} @@ -121,7 +121,7 @@ DTOR=".dtors ALIGN(4) : KEEP (*(.dtors)) ${CONSTRUCTING+${DTOR_END}} } :text" -STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} : +STACK=" .stack ${RELOCATING+${STACK_ADDR}} : { ${RELOCATING+_stack = .;} *(.stack) @@ -145,10 +145,6 @@ ${RELOCATING+/* Do we need any of these for elf? __DYNAMIC = 0; ${STACKZERO+${STACKZERO}} ${SHLIB_PATH+${SHLIB_PATH}} */} ${RELOCATING+${EXECUTABLE_SYMBOLS}} ${RELOCATING+${INPUT_FILES}} -${RELOCATING- /* For some reason, the Solaris linker makes bad executables - if gld -r is used and the intermediate file has sections starting - at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld - bug. But for now assigning the zero vmas works. */} PHDRS { @@ -208,20 +204,20 @@ SECTIONS /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ . = ALIGN(128) + (. & (128 - 1)); - .preinit_array ${RELOCATING-0} : + .preinit_array : { ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__preinit_array_start = .);}} KEEP (*(.preinit_array)) ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__preinit_array_end = .);}} } - .init_array ${RELOCATING-0} : + .init_array : { ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__init_array_start = .);}} KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__init_array_end = .);}} } - .fini_array ${RELOCATING-0} : + .fini_array : { ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_start = .);}} KEEP (*(.fini_array)) @@ -273,14 +269,14 @@ SECTIONS ${TEXT_DYNAMIC-${DYNAMIC}} ${TEXT_DYNAMIC+${DYNAMIC}} - .hash ${RELOCATING-0} : { *(.hash) } :dynamic :dyn - .dynsym ${RELOCATING-0} : { *(.dynsym) } :dynamic :dyn - .dynstr ${RELOCATING-0} : { *(.dynstr) } :dynamic :dyn + .hash : { *(.hash) } :dynamic :dyn + .dynsym : { *(.dynsym) } :dynamic :dyn + .dynstr : { *(.dynstr) } :dynamic :dyn ${DATA_PLT-${BSS_PLT-${PLT}}} .got.plt : { *(.got.plt) } :dynamic :dyn - .gnu.version ${RELOCATING-0} : { *(.gnu.version) } - .gnu.version_d ${RELOCATING-0}: { *(.gnu.version_d) } - .gnu.version_r ${RELOCATING-0}: { *(.gnu.version_r) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } EOF if [ "x$COMBRELOC" = x ]; then COMBRELOCCAT=cat @@ -288,40 +284,40 @@ else COMBRELOCCAT="cat > $COMBRELOC" fi eval $COMBRELOCCAT < ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ cat >> ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ cat >> ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ <DATA} - .rodata1 ${RELOCATING-0} : { + .rodata1 : { *(.rodata1) *(.rodata1.*) } ${RELOCATING+ >DATA} - .data ${RELOCATING-0} : + .data : { ${RELOCATING+${DATA_START_SYMBOLS}} *(.data) @@ -120,7 +120,7 @@ SECTIONS ${CONSTRUCTING+CONSTRUCTORS} } ${RELOCATING+ >DATA} - .data1 ${RELOCATING-0} : { + .data1 : { *(.data1) *(.data1.*) } ${RELOCATING+ >DATA} @@ -131,7 +131,7 @@ SECTIONS /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ - .sdata ${RELOCATING-0} : { + .sdata : { *(.sdata) *(.sdata.*) } ${RELOCATING+ >DATA} @@ -139,8 +139,8 @@ SECTIONS ${RELOCATING+_edata = .;} ${RELOCATING+PROVIDE (edata = .);} ${RELOCATING+__bss_start = .;} - .sbss ${RELOCATING-0} : { *(.sbss) *(.scommon) } ${RELOCATING+ >DATA} - .bss ${RELOCATING-0} : + .sbss : { *(.sbss) *(.scommon) } ${RELOCATING+ >DATA} + .bss : { *(.dynbss) *(.dynbss.*) diff --git a/ld/scripttempl/elfd30v.sc b/ld/scripttempl/elfd30v.sc index b5db0e6..d4eddbe 100644 --- a/ld/scripttempl/elfd30v.sc +++ b/ld/scripttempl/elfd30v.sc @@ -1,5 +1,5 @@ -CTOR=".ctors ${CONSTRUCTING-0} : +CTOR=".ctors : { ${CONSTRUCTING+ __CTOR_LIST__ = .; } /* gcc uses crtbegin.o to find the start of @@ -26,7 +26,7 @@ CTOR=".ctors ${CONSTRUCTING-0} : ${CONSTRUCTING+ __CTOR_END__ = .; } } ${RELOCATING+ > ${DATA_MEMORY}}" -DTOR=" .dtors ${CONSTRUCTING-0} : +DTOR=" .dtors : { ${CONSTRUCTING+ __DTOR_LIST__ = .; } KEEP (*crtbegin.o(.dtors)) @@ -53,57 +53,57 @@ SECTIONS { /* Read-only sections, merged into text segment: */ ${TEXT_DYNAMIC+${DYNAMIC}} - .hash ${RELOCATING-0} : { *(.hash) } - .dynsym ${RELOCATING-0} : { *(.dynsym) } - .dynstr ${RELOCATING-0} : { *(.dynstr) } - .gnu.version ${RELOCATING-0} : { *(.gnu.version) } - .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) } - .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) } - - .rel.text ${RELOCATING-0} : { *(.rel.text) *(.rel.gnu.linkonce.t*) } - .rela.text ${RELOCATING-0} : { *(.rela.text) *(.rela.gnu.linkonce.t*) } - .rel.data ${RELOCATING-0} : { *(.rel.data) *(.rel.gnu.linkonce.d*) } - .rela.data ${RELOCATING-0} : { *(.rela.data) *(.rela.gnu.linkonce.d*) } - .rel.rodata ${RELOCATING-0} : { *(.rel.rodata) *(.rel.gnu.linkonce.r*) } - .rela.rodata ${RELOCATING-0} : { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } - .rel.stext ${RELOCATING-0} : { *(.rel.stest) } - .rela.stext ${RELOCATING-0} : { *(.rela.stest) } - .rel.etext ${RELOCATING-0} : { *(.rel.etest) } - .rela.etext ${RELOCATING-0} : { *(.rela.etest) } - .rel.sdata ${RELOCATING-0} : { *(.rel.sdata) } - .rela.sdata ${RELOCATING-0} : { *(.rela.sdata) } - .rel.edata ${RELOCATING-0} : { *(.rel.edata) } - .rela.edata ${RELOCATING-0} : { *(.rela.edata) } - .rel.eit_v ${RELOCATING-0} : { *(.rel.eit_v) } - .rela.eit_v ${RELOCATING-0} : { *(.rela.eit_v) } - .rel.sbss ${RELOCATING-0} : { *(.rel.sbss) } - .rela.sbss ${RELOCATING-0} : { *(.rela.sbss) } - .rel.ebss ${RELOCATING-0} : { *(.rel.ebss) } - .rela.ebss ${RELOCATING-0} : { *(.rela.ebss) } - .rel.srodata ${RELOCATING-0} : { *(.rel.srodata) } - .rela.srodata ${RELOCATING-0} : { *(.rela.srodata) } - .rel.erodata ${RELOCATING-0} : { *(.rel.erodata) } - .rela.erodata ${RELOCATING-0} : { *(.rela.erodata) } - .rel.got ${RELOCATING-0} : { *(.rel.got) } - .rela.got ${RELOCATING-0} : { *(.rela.got) } - .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) } - .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) } - .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) } - .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) } - .rel.init ${RELOCATING-0} : { *(.rel.init) } - .rela.init ${RELOCATING-0} : { *(.rela.init) } - .rel.fini ${RELOCATING-0} : { *(.rel.fini) } - .rela.fini ${RELOCATING-0} : { *(.rela.fini) } - .rel.bss ${RELOCATING-0} : { *(.rel.bss) } - .rela.bss ${RELOCATING-0} : { *(.rela.bss) } - .rel.plt ${RELOCATING-0} : { *(.rel.plt) } - .rela.plt ${RELOCATING-0} : { *(.rela.plt) } - - .init ${RELOCATING-0} : { *(.init) } =${NOP-0} + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + + .rel.text : { *(.rel.text) *(.rel.gnu.linkonce.t*) } + .rela.text : { *(.rela.text) *(.rela.gnu.linkonce.t*) } + .rel.data : { *(.rel.data) *(.rel.gnu.linkonce.d*) } + .rela.data : { *(.rela.data) *(.rela.gnu.linkonce.d*) } + .rel.rodata : { *(.rel.rodata) *(.rel.gnu.linkonce.r*) } + .rela.rodata : { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } + .rel.stext : { *(.rel.stest) } + .rela.stext : { *(.rela.stest) } + .rel.etext : { *(.rel.etest) } + .rela.etext : { *(.rela.etest) } + .rel.sdata : { *(.rel.sdata) } + .rela.sdata : { *(.rela.sdata) } + .rel.edata : { *(.rel.edata) } + .rela.edata : { *(.rela.edata) } + .rel.eit_v : { *(.rel.eit_v) } + .rela.eit_v : { *(.rela.eit_v) } + .rel.sbss : { *(.rel.sbss) } + .rela.sbss : { *(.rela.sbss) } + .rel.ebss : { *(.rel.ebss) } + .rela.ebss : { *(.rela.ebss) } + .rel.srodata : { *(.rel.srodata) } + .rela.srodata : { *(.rela.srodata) } + .rel.erodata : { *(.rel.erodata) } + .rela.erodata : { *(.rela.erodata) } + .rel.got : { *(.rel.got) } + .rela.got : { *(.rela.got) } + .rel.ctors : { *(.rel.ctors) } + .rela.ctors : { *(.rela.ctors) } + .rel.dtors : { *(.rel.dtors) } + .rela.dtors : { *(.rela.dtors) } + .rel.init : { *(.rel.init) } + .rela.init : { *(.rela.init) } + .rel.fini : { *(.rel.fini) } + .rela.fini : { *(.rela.fini) } + .rel.bss : { *(.rel.bss) } + .rela.bss : { *(.rela.bss) } + .rel.plt : { *(.rel.plt) } + .rela.plt : { *(.rela.plt) } + + .init : { *(.init) } =${NOP-0} ${DATA_PLT-${PLT}} /* Internal text space */ - .stext ${RELOCATING-0} : { *(.stext) } ${RELOCATING+ > text} + .stext : { *(.stext) } ${RELOCATING+ > text} /* Internal text space or external memory */ .text : @@ -116,23 +116,23 @@ SECTIONS } ${RELOCATING+ > ${TEXT_MEMORY}} /* Internal data space */ - .srodata ${RELOCATING-0} : { *(.srodata) } ${RELOCATING+ > data} - .sdata ${RELOCATING-0} : { *(.sdata) } ${RELOCATING+ > data} + .srodata : { *(.srodata) } ${RELOCATING+ > data} + .sdata : { *(.sdata) } ${RELOCATING+ > data} /* Internal data space or external memory */ - .rodata ${RELOCATING-0} : { *(.rodata) } ${RELOCATING+ > ${DATA_MEMORY}} + .rodata : { *(.rodata) } ${RELOCATING+ > ${DATA_MEMORY}} /* C++ exception support. */ - .eh_frame ${RELOCATING-0} : { KEEP (*(.eh_frame)) } ${RELOCATING+ > ${DATA_MEMORY}} - .gcc_except_table ${RELOCATING-0} : { *(.gcc_except_table) } ${RELOCATING+ > ${DATA_MEMORY}} + .eh_frame : { KEEP (*(.eh_frame)) } ${RELOCATING+ > ${DATA_MEMORY}} + .gcc_except_table : { *(.gcc_except_table) } ${RELOCATING+ > ${DATA_MEMORY}} /* Java class registration support. */ - .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) } ${RELOCATING+ >${DATA_MEMORY}} + .jcr : { KEEP (*(.jcr)) } ${RELOCATING+ >${DATA_MEMORY}} ${RELOCATING+${CTOR}} ${RELOCATING+${DTOR}} - .data ${RELOCATING-0} : + .data : { *(.data) *(.gnu.linkonce.d*) @@ -141,31 +141,31 @@ SECTIONS } ${RELOCATING+ > ${DATA_MEMORY}} /* External memory */ - .etext ${RELOCATING-0} : + .etext : { ${RELOCATING+ PROVIDE (__etext_start = .) ; } *(.etext) ${RELOCATING+ PROVIDE (__etext_end = .) ; } } ${RELOCATING+ > emem} - .erodata ${RELOCATING-0} : { *(.erodata) } ${RELOCATING+ > emem} - .edata ${RELOCATING-0} : { *(.edata) } ${RELOCATING+ > emem} + .erodata : { *(.erodata) } ${RELOCATING+ > emem} + .edata : { *(.edata) } ${RELOCATING+ > emem} - .sbss ${RELOCATING-0} : + .sbss : { ${RELOCATING+ PROVIDE (__sbss_start = .) ; } *(.sbss) ${RELOCATING+ PROVIDE (__sbss_end = .) ; } } ${RELOCATING+ > data} - .ebss ${RELOCATING-0} : + .ebss : { ${RELOCATING+ PROVIDE (__ebss_start = .) ; } *(.ebss) ${RELOCATING+ PROVIDE (__ebss_end = .) ; } } ${RELOCATING+ > data} - .bss ${RELOCATING-0} : + .bss : { ${RELOCATING+ PROVIDE (__bss_start = .) ; } *(.bss) @@ -174,7 +174,7 @@ SECTIONS ${RELOCATING+ _end = . ; } } ${RELOCATING+ > ${DATA_MEMORY}} - .eit_v ${RELOCATING-0} : + .eit_v : { ${RELOCATING+ PROVIDE (__eit_start = .) ; } *(.eit_v) diff --git a/ld/scripttempl/elfi370.sc b/ld/scripttempl/elfi370.sc index 140021a..26c5e9e 100644 --- a/ld/scripttempl/elfi370.sc +++ b/ld/scripttempl/elfi370.sc @@ -27,10 +27,10 @@ test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT} test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT} test -z "$ATTRS_SECTIONS" && ATTRS_SECTIONS=".gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }" test "$LD_FLAG" = "N" && DATA_ADDR=. -SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2) }" -SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2) }" -INTERP=".interp ${RELOCATING-0} : { *(.interp) }" -PLT=".plt ${RELOCATING-0} : { *(.plt) }" +SBSS2=".sbss2 : { *(.sbss2) }" +SDATA2=".sdata2 : { *(.sdata2) }" +INTERP=".interp : { *(.interp) }" +PLT=".plt : { *(.plt) }" cat < page0} /* Start of text section. */ - .stext ${RELOCATING-0} : + .stext : { *(.stext) } ${RELOCATING+ > ${TEXT_MEMORY}} - .init ${RELOCATING-0} : + .init : { *(.init) } ${RELOCATING+=${NOP-0}} @@ -302,7 +302,7 @@ SECTIONS ${RELOCATING-${INSTALL_RELOC}} ${RELOCATING-${FINISH_RELOC}} - .text ${RELOCATING-0}: + .text : { /* Put startup code at beginning so that _start keeps same address. */ ${RELOCATING+${STARTUP_CODE}} @@ -323,24 +323,24 @@ SECTIONS } ${RELOCATING+ > ${TEXT_MEMORY}} - .eh_frame ${RELOCATING-0} : + .eh_frame : { KEEP (*(.eh_frame)) } ${RELOCATING+ > ${TEXT_MEMORY}} - .gcc_except_table ${RELOCATING-0} : + .gcc_except_table : { *(.gcc_except_table) } ${RELOCATING+ > ${TEXT_MEMORY}} - .rodata ${RELOCATING-0} : + .rodata : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r*)} } ${RELOCATING+ > ${TEXT_MEMORY}} - .rodata1 ${RELOCATING-0} : + .rodata1 : { *(.rodata1) } ${RELOCATING+ > ${TEXT_MEMORY}} @@ -349,7 +349,7 @@ SECTIONS ${RELOCATING+${CTOR}} ${RELOCATING+${DTOR}} - .jcr ${RELOCATING-0} : + .jcr : { KEEP (*(.jcr)) } ${RELOCATING+ > ${TEXT_MEMORY}} @@ -362,7 +362,7 @@ SECTIONS We construct the DATA image section in PROM at end of all these read-only sections. The data image must be copied at init time. Refer to GNU ld, Section 3.6.8.2 Output Section LMA. */ - .data ${RELOCATING-0} : ${RELOCATING+AT (__data_image)} + .data : ${RELOCATING+AT (__data_image)} { ${RELOCATING+__data_section_start = .;} ${RELOCATING+PROVIDE (__data_section_start = .);} @@ -385,7 +385,7 @@ SECTIONS ${RELOCATING+${PRE_COMPUTE_DATA_SIZE}} - /* .install ${RELOCATING-0}: + /* .install : { . = _data_image_end; } ${RELOCATING+ > ${TEXT_MEMORY}} */ @@ -394,7 +394,7 @@ SECTIONS ${RELOCATING-${BSS_DATA_RELOC}} ${RELOCATING-${SOFT_REGS_RELOC}} - .bss ${RELOCATING-0} : + .bss : { ${RELOCATING+__bss_start = .;} ${RELOCATING+*(.sbss)} @@ -410,7 +410,7 @@ SECTIONS ${RELOCATING+__bss_size = SIZEOF(.bss);} ${RELOCATING+PROVIDE (__bss_size = SIZEOF(.bss));} - .eeprom ${RELOCATING-0} : + .eeprom : { *(.eeprom) *(.eeprom.*) diff --git a/ld/scripttempl/elfm68hc12.sc b/ld/scripttempl/elfm68hc12.sc index 0774eb2..b2b4e6d 100644 --- a/ld/scripttempl/elfm68hc12.sc +++ b/ld/scripttempl/elfm68hc12.sc @@ -24,7 +24,7 @@ test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT} if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi test "$LD_FLAG" = "N" && DATA_ADDR=. -CTOR=".ctors ${CONSTRUCTING-0} : +CTOR=".ctors : { ${CONSTRUCTING+ PROVIDE (__CTOR_LIST__ = .); } ${CONSTRUCTING+${CTOR_START}} @@ -34,7 +34,7 @@ CTOR=".ctors ${CONSTRUCTING-0} : ${CONSTRUCTING+ PROVIDE(__CTOR_END__ = .); } } ${RELOCATING+ > ${TEXT_MEMORY}}" -DTOR=" .dtors ${CONSTRUCTING-0} : +DTOR=" .dtors : { ${CONSTRUCTING+ PROVIDE(__DTOR_LIST__ = .); } KEEP (*(.dtors)) @@ -127,34 +127,34 @@ PRE_COMPUTE_DATA_SIZE=" " INSTALL_RELOC=" - .install0 0 : { *(.install0) } - .install1 0 : { *(.install1) } - .install2 0 : { *(.install2) } - .install3 0 : { *(.install3) } - .install4 0 : { *(.install4) } + .install0 : { *(.install0) } + .install1 : { *(.install1) } + .install2 : { *(.install2) } + .install3 : { *(.install3) } + .install4 : { *(.install4) } " FINISH_RELOC=" - .fini0 0 : { *(.fini0) } - .fini1 0 : { *(.fini1) } - .fini2 0 : { *(.fini2) } - .fini3 0 : { *(.fini3) } - .fini4 0 : { *(.fini4) } + .fini0 : { *(.fini0) } + .fini1 : { *(.fini1) } + .fini2 : { *(.fini2) } + .fini3 : { *(.fini3) } + .fini4 : { *(.fini4) } " BSS_DATA_RELOC=" - .data1 0 : { *(.data1) } + .data1 : { *(.data1) } /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ - .sdata 0 : { *(.sdata) } - .sbss 0 : { *(.sbss) } - .scommon 0 : { *(.scommon) } + .sdata : { *(.sdata) } + .sbss : { *(.sbss) } + .scommon : { *(.scommon) } " SOFT_REGS_RELOC=" - .softregs 0 : { *(.softregs) } + .softregs : { *(.softregs) } " cat < page0} /* Start of text section. */ - .stext ${RELOCATING-0} : + .stext : { *(.stext) } ${RELOCATING+ > ${TEXT_MEMORY}} - .init ${RELOCATING-0} : + .init : { *(.init) } ${RELOCATING+=${NOP-0}} @@ -301,7 +301,7 @@ SECTIONS ${RELOCATING-${INSTALL_RELOC}} ${RELOCATING-${FINISH_RELOC}} - .text ${RELOCATING-0}: + .text : { /* Put startup code at beginning so that _start keeps same address. */ ${RELOCATING+${STARTUP_CODE}} @@ -322,17 +322,17 @@ SECTIONS ${RELOCATING+. = ALIGN(2);} } ${RELOCATING+ > ${TEXT_MEMORY} =0xa7a7a7a7} - .eh_frame ${RELOCATING-0} : + .eh_frame : { KEEP (*(.eh_frame)) } ${RELOCATING+ > ${TEXT_MEMORY}} - .gcc_except_table ${RELOCATING-0} : + .gcc_except_table : { *(.gcc_except_table) } ${RELOCATING+ > ${TEXT_MEMORY}} - .rodata ${RELOCATING-0} : + .rodata : { *(.rodata) ${RELOCATING+*(.rodata.*)} @@ -340,7 +340,7 @@ SECTIONS ${RELOCATING+. = ALIGN(2);} } ${RELOCATING+ > ${TEXT_MEMORY} =0xffffffff} - .rodata1 ${RELOCATING-0} : + .rodata1 : { *(.rodata1) ${RELOCATING+. = ALIGN(2);} @@ -350,7 +350,7 @@ SECTIONS ${RELOCATING+${CTOR}} ${RELOCATING+${DTOR}} - .jcr ${RELOCATING-0} : + .jcr : { KEEP (*(.jcr)) } ${RELOCATING+ > ${TEXT_MEMORY}} @@ -363,7 +363,7 @@ SECTIONS We construct the DATA image section in PROM at end of all these read-only sections. The data image must be copied at init time. Refer to GNU ld, Section 3.6.8.2 Output Section LMA. */ - .data ${RELOCATING-0} : ${RELOCATING+AT (__data_image)} + .data : ${RELOCATING+AT (__data_image)} { ${RELOCATING+__data_section_start = .;} ${RELOCATING+PROVIDE (__data_section_start = .);} @@ -387,7 +387,7 @@ SECTIONS ${RELOCATING+${PRE_COMPUTE_DATA_SIZE}} - /* .install ${RELOCATING-0}: + /* .install : { . = _data_image_end; } ${RELOCATING+ > ${TEXT_MEMORY}} */ @@ -396,7 +396,7 @@ SECTIONS ${RELOCATING-${BSS_DATA_RELOC}} ${RELOCATING-${SOFT_REGS_RELOC}} - .bss ${RELOCATING-0} : + .bss : { ${RELOCATING+__bss_start = .;} ${RELOCATING+*(.softregs)} @@ -413,7 +413,7 @@ SECTIONS ${RELOCATING+__bss_size = SIZEOF(.bss);} ${RELOCATING+PROVIDE (__bss_size = SIZEOF(.bss));} - .eeprom ${RELOCATING-0} : + .eeprom : { *(.eeprom) *(.eeprom.*) diff --git a/ld/scripttempl/elfmicroblaze.sc b/ld/scripttempl/elfmicroblaze.sc index a54b891..62de661 100644 --- a/ld/scripttempl/elfmicroblaze.sc +++ b/ld/scripttempl/elfmicroblaze.sc @@ -5,7 +5,7 @@ test -z "$ENTRY" && ENTRY=_start #test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x0" -CTOR=".ctors ${CONSTRUCTING-0} : +CTOR=".ctors : { ${CONSTRUCTING+${CTOR_START}} /* gcc uses crtbegin.o to find the start of @@ -31,7 +31,7 @@ CTOR=".ctors ${CONSTRUCTING-0} : ${CONSTRUCTING+${CTOR_END}} }" -DTOR=" .dtors ${CONSTRUCTING-0} : +DTOR=" .dtors : { ${CONSTRUCTING+${DTOR_START}} KEEP (*crtbegin.o(.dtors)) diff --git a/ld/scripttempl/elfxtensa.sc b/ld/scripttempl/elfxtensa.sc index 588ec0c..9671c8e 100644 --- a/ld/scripttempl/elfxtensa.sc +++ b/ld/scripttempl/elfxtensa.sc @@ -123,30 +123,30 @@ if test -n "${COMMONPAGESIZE}"; then DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);" fi if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}"; then - INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }" + INITIAL_READONLY_SECTIONS=".interp : { *(.interp) }" fi if test -z "$PLT"; then - PLT=".plt ${RELOCATING-0} : { *(.plt) }" + PLT=".plt : { *(.plt) }" fi test -n "${DATA_PLT-${BSS_PLT-text}}" && TEXT_PLT=yes if test -z "$GOT"; then if test -z "$SEPARATE_GOTPLT"; then - GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.got) }" + GOT=".got : { *(.got.plt) *(.got) }" else - GOT=".got ${RELOCATING-0} : { *(.got) }" - GOTPLT=".got.plt ${RELOCATING-0} : { *(.got.plt) }" + GOT=".got : { *(.got) }" + GOTPLT=".got.plt : { *(.got.plt) }" fi fi -DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }" -RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }" +DYNAMIC=".dynamic : { *(.dynamic) }" +RODATA=".rodata : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }" DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }" DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }" -INIT_LIT=".init.literal 0 : { *(.init.literal) }" -INIT=".init 0 : { *(.init) }" -FINI_LIT=".fini.literal 0 : { *(.fini.literal) }" -FINI=".fini 0 : { *(.fini) }" +INIT_LIT=".init.literal : { *(.init.literal) }" +INIT=".init : { *(.init) }" +FINI_LIT=".fini.literal : { *(.fini.literal) }" +FINI=".fini : { *(.fini) }" if test -z "${NO_SMALL_DATA}"; then - SBSS=".sbss ${RELOCATING-0} : + SBSS=".sbss : { ${RELOCATING+${SBSS_START_SYMBOLS}} ${CREATE_SHLIB+*(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)} @@ -155,29 +155,29 @@ if test -z "${NO_SMALL_DATA}"; then *(.scommon) ${RELOCATING+${SBSS_END_SYMBOLS}} }" - SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }" + SBSS2=".sbss2 : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }" SDATA="/* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ - .sdata ${RELOCATING-0} : + .sdata : { ${RELOCATING+${SDATA_START_SYMBOLS}} ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)} *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*}) }" - SDATA2=".sdata2 ${RELOCATING-0} : + SDATA2=".sdata2 : { ${RELOCATING+${SDATA2_START_SYMBOLS}} *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*}) }" - REL_SDATA=".rel.sdata ${RELOCATING-0} : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) } - .rela.sdata ${RELOCATING-0} : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }" - REL_SBSS=".rel.sbss ${RELOCATING-0} : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) } - .rela.sbss ${RELOCATING-0} : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }" - REL_SDATA2=".rel.sdata2 ${RELOCATING-0} : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) } - .rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }" - REL_SBSS2=".rel.sbss2 ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) } - .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }" + REL_SDATA=".rel.sdata : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) } + .rela.sdata : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }" + REL_SBSS=".rel.sbss : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) } + .rela.sbss : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }" + REL_SDATA2=".rel.sdata2 : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) } + .rela.sdata2 : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }" + REL_SBSS2=".rel.sbss2 : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) } + .rela.sbss2 : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }" else NO_SMALL_DATA=" " fi @@ -193,31 +193,31 @@ if test -z "${SDATA_GOT}"; then fi test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" " test "${LARGE_SECTIONS}" = "yes" && REL_LARGE=" - .rel.ldata ${RELOCATING-0} : { *(.rel.ldata${RELOCATING+ .rel.ldata.* .rel.gnu.linkonce.l.*}) } - .rela.ldata ${RELOCATING-0} : { *(.rela.ldata${RELOCATING+ .rela.ldata.* .rela.gnu.linkonce.l.*}) } - .rel.lbss ${RELOCATING-0} : { *(.rel.lbss${RELOCATING+ .rel.lbss.* .rel.gnu.linkonce.lb.*}) } - .rela.lbss ${RELOCATING-0} : { *(.rela.lbss${RELOCATING+ .rela.lbss.* .rela.gnu.linkonce.lb.*}) } - .rel.lrodata ${RELOCATING-0} : { *(.rel.lrodata${RELOCATING+ .rel.lrodata.* .rel.gnu.linkonce.lr.*}) } - .rela.lrodata ${RELOCATING-0} : { *(.rela.lrodata${RELOCATING+ .rela.lrodata.* .rela.gnu.linkonce.lr.*}) }" + .rel.ldata : { *(.rel.ldata${RELOCATING+ .rel.ldata.* .rel.gnu.linkonce.l.*}) } + .rela.ldata : { *(.rela.ldata${RELOCATING+ .rela.ldata.* .rela.gnu.linkonce.l.*}) } + .rel.lbss : { *(.rel.lbss${RELOCATING+ .rel.lbss.* .rel.gnu.linkonce.lb.*}) } + .rela.lbss : { *(.rela.lbss${RELOCATING+ .rela.lbss.* .rela.gnu.linkonce.lb.*}) } + .rel.lrodata : { *(.rel.lrodata${RELOCATING+ .rel.lrodata.* .rel.gnu.linkonce.lr.*}) } + .rela.lrodata : { *(.rela.lrodata${RELOCATING+ .rela.lrodata.* .rela.gnu.linkonce.lr.*}) }" test "${LARGE_SECTIONS}" = "yes" && OTHER_BSS_SECTIONS=" ${OTHER_BSS_SECTIONS} - .lbss ${RELOCATING-0} : + .lbss : { *(.dynlbss) *(.lbss${RELOCATING+ .lbss.* .gnu.linkonce.lb.*}) *(LARGE_COMMON) }" test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS=" - .lrodata ${RELOCATING-0} ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} : + .lrodata ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} : { *(.lrodata${RELOCATING+ .lrodata.* .gnu.linkonce.lr.*}) } - .ldata ${RELOCATING-0} ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} : + .ldata ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} : { *(.ldata${RELOCATING+ .ldata.* .gnu.linkonce.l.*}) ${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);} }" -CTOR=".ctors ${CONSTRUCTING-0} : +CTOR=".ctors : { ${CONSTRUCTING+${CTOR_START}} /* gcc uses crtbegin.o to find the start of @@ -243,7 +243,7 @@ CTOR=".ctors ${CONSTRUCTING-0} : KEEP (*(.ctors)) ${CONSTRUCTING+${CTOR_END}} }" -DTOR=".dtors ${CONSTRUCTING-0} : +DTOR=".dtors : { ${CONSTRUCTING+${DTOR_START}} KEEP (*crtbegin.o(.dtors)) @@ -253,7 +253,7 @@ DTOR=".dtors ${CONSTRUCTING-0} : KEEP (*(.dtors)) ${CONSTRUCTING+${DTOR_END}} }" -STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} : +STACK=" .stack ${RELOCATING+${STACK_ADDR}} : { ${RELOCATING+_stack = .;} *(.stack) @@ -272,10 +272,6 @@ ${RELOCATING+ENTRY(${ENTRY})} ${RELOCATING+${LIB_SEARCH_DIRS}} ${RELOCATING+${EXECUTABLE_SYMBOLS}} ${RELOCATING+${INPUT_FILES}} -${RELOCATING- /* For some reason, the Solaris linker makes bad executables - if gld -r is used and the intermediate file has sections starting - at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld - bug. But for now assigning the zero vmas works. */} SECTIONS { @@ -291,13 +287,13 @@ test -n "${RELOCATING+0}" || unset NON_ALLOC_DYN test -z "${NON_ALLOC_DYN}" || TEXT_DYNAMIC= cat > ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ cat >> ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ @@ -357,8 +353,8 @@ EOF fi cat >> ldscripts/dyntmp.$$ < ROM} + .int_vec : { *(.int_vec) } ${RELOCATING+> ROM} - .rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)} } ${RELOCATING+> ROM} + .rodata : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)} } ${RELOCATING+> ROM} ${RELOCATING+${CTOR}} ${RELOCATING+${DTOR}} .jcr : { KEEP (*(.jcr)) } ${RELOCATING+> ROM} @@ -163,7 +159,7 @@ SECTIONS .gcc_except_table : { *(.gcc_except_table) } ${RELOCATING+> ROM} .plt : { *(.plt) } ${RELOCATING+> ROM} - .text ${RELOCATING-0} : + .text : { ${RELOCATING+${TEXT_START_SYMBOLS}} *(.text) @@ -174,13 +170,13 @@ SECTIONS ${RELOCATING+*(.gnu.linkonce.t.*)} ${RELOCATING+${OTHER_TEXT_SECTIONS}} } ${RELOCATING+> ROM =${NOP-0}} - .init ${RELOCATING-0} : + .init : { ${RELOCATING+${INIT_START}} KEEP (*(.init)) ${RELOCATING+${INIT_END}} } ${RELOCATING+> ROM =${NOP-0}} - .fini ${RELOCATING-0} : + .fini : { ${RELOCATING+${FINI_START}} KEEP (*(.fini)) -- 2.7.4