diff options
author | Alan Modra <amodra@gmail.com> | 2009-10-10 04:34:39 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2009-10-10 04:34:39 +0000 |
commit | ec2d9b29273a260dad374eca5bbe2f7922d0bfde (patch) | |
tree | 2156cd6930f0b4701cbf590d22149f1d463670d7 /ld/scripttempl/armbpabi.sc | |
parent | d4780e57f540e6c89da1cfef35666ae3f20d26a8 (diff) | |
download | gdb-ec2d9b29273a260dad374eca5bbe2f7922d0bfde.zip gdb-ec2d9b29273a260dad374eca5bbe2f7922d0bfde.tar.gz gdb-ec2d9b29273a260dad374eca5bbe2f7922d0bfde.tar.bz2 |
Revert 2009-09-28 changes.
Diffstat (limited to 'ld/scripttempl/armbpabi.sc')
-rw-r--r-- | ld/scripttempl/armbpabi.sc | 72 |
1 files changed, 38 insertions, 34 deletions
diff --git a/ld/scripttempl/armbpabi.sc b/ld/scripttempl/armbpabi.sc index 5eacc44..90da2ed 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 : { *(.plt) }" -RODATA=".rodata : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }" +PLT=".plt ${RELOCATING-0} : { *(.plt) }" +RODATA=".rodata ${RELOCATING-0} : { *(.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 : + SBSS=".sbss ${RELOCATING-0} : { ${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 : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }" + SBSS2=".sbss2 ${RELOCATING-0} : { *(.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 : + .sdata ${RELOCATING-0} : { ${RELOCATING+${SDATA_START_SYMBOLS}} *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*}) }" - 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.*}) }" + 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.*}) }" else NO_SMALL_DATA=" " fi test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" " -CTOR=".ctors : +CTOR=".ctors ${CONSTRUCTING-0} : { ${CONSTRUCTING+${CTOR_START}} /* gcc uses crtbegin.o to find the start of @@ -90,7 +90,7 @@ CTOR=".ctors : KEEP (*(.ctors)) ${CONSTRUCTING+${CTOR_END}} }" -DTOR=".dtors : +DTOR=".dtors ${CONSTRUCTING-0} : { ${CONSTRUCTING+${DTOR_START}} KEEP (*crtbegin.o(.dtors)) @@ -100,7 +100,7 @@ DTOR=".dtors : KEEP (*(.dtors)) ${CONSTRUCTING+${DTOR_END}} }" -STACK=" .stack ${RELOCATING+${STACK_ADDR}} : +STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} : { ${RELOCATING+_stack = .;} *(.stack) @@ -131,6 +131,10 @@ ${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 @@ -169,13 +173,13 @@ SECTIONS EOF cat <<EOF - .init : + .init ${RELOCATING-0} : { ${RELOCATING+${INIT_START}} KEEP (*(.init)) ${RELOCATING+${INIT_END}} } =${NOP-0} - .text : + .text ${RELOCATING-0} : { ${RELOCATING+${TEXT_START_SYMBOLS}} *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*}) @@ -183,7 +187,7 @@ cat <<EOF *(.gnu.warning) ${RELOCATING+${OTHER_TEXT_SECTIONS}} } =${NOP-0} - .fini : + .fini ${RELOCATING-0} : { ${RELOCATING+${FINI_START}} KEEP (*(.fini)) @@ -200,7 +204,7 @@ cat <<EOF ${RELOCATING+PROVIDE (Image\$\$ER_RO\$\$Limit = .);} ${WRITABLE_RODATA-${RODATA}} - .rodata1 : { *(.rodata1) } + .rodata1 ${RELOCATING-0} : { *(.rodata1) } ${CREATE_SHLIB-${SDATA2}} ${CREATE_SHLIB-${SBSS2}} @@ -208,13 +212,13 @@ cat <<EOF segment; there is no runtime relocation applied to these arrays. */ - .preinit_array : + .preinit_array ${RELOCATING-0} : { ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__preinit_array_start = .);}} KEEP (*(.preinit_array)) ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__preinit_array_end = .);}} } - .init_array : + .init_array ${RELOCATING-0} : { /* SymbianOS uses this symbol. */ ${RELOCATING+PROVIDE (SHT\$\$INIT_ARRAY\$\$Base = .);} @@ -225,7 +229,7 @@ cat <<EOF /* SymbianOS uses this symbol. */ ${RELOCATING+PROVIDE (SHT\$\$INIT_ARRAY\$\$Limit = .);} } - .fini_array : + .fini_array ${RELOCATING-0} : { ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_start = .);}} KEEP (*(.fini_array)) @@ -235,8 +239,8 @@ cat <<EOF ${OTHER_READONLY_SECTIONS} .eh_frame_hdr : { *(.eh_frame_hdr) } - .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } - .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } + .eh_frame ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.eh_frame)) } + .gcc_except_table ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ @@ -245,16 +249,16 @@ cat <<EOF ${CREATE_PIE+${RELOCATING+. = ${SHLIB_DATA_ADDR};}} /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } - .gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } + .eh_frame ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.eh_frame)) } + .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } /* Thread Local Storage sections */ - .tdata : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) } - .tbss : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} } + .tdata ${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) } + .tbss ${RELOCATING-0} : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} } ${RELOCATING+${CTOR}} ${RELOCATING+${DTOR}} - .jcr : { KEEP (*(.jcr)) } + .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) } ${RELOCATING+${DATARELRO}} ${OTHER_RELRO_SECTIONS} @@ -262,13 +266,13 @@ cat <<EOF ${DATA_PLT+${PLT_BEFORE_GOT-${PLT}}} - .data : + .data ${RELOCATING-0} : { ${RELOCATING+${DATA_START_SYMBOLS}} *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*}) ${CONSTRUCTING+SORT(CONSTRUCTORS)} } - .data1 : { *(.data1) } + .data1 ${RELOCATING-0} : { *(.data1) } ${WRITABLE_RODATA+${RODATA}} ${OTHER_READWRITE_SECTIONS} ${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}} @@ -283,7 +287,7 @@ cat <<EOF ${RELOCATING+${OTHER_BSS_SYMBOLS}} ${SBSS} ${BSS_PLT+${PLT}} - .bss : + .bss ${RELOCATING-0} : { *(.dynbss) *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*}) |