X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=ld%2Fscripttempl%2Felf64hppa.sc;h=ee8fb93bba3201c1b48cb537ea87322fd98d6841;hb=77486630b13e9e586b0a1556cba9876a0ede99da;hp=663b07321188bbc665e92a3981a0047a1e77b751;hpb=b90efa5b79ac1524ec260f8eb89d1be37e0219a7;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/scripttempl/elf64hppa.sc b/ld/scripttempl/elf64hppa.sc index 663b073211..ee8fb93bba 100644 --- a/ld/scripttempl/elf64hppa.sc +++ b/ld/scripttempl/elf64hppa.sc @@ -1,5 +1,5 @@ -# Copyright (C) 2014-2015 Free Software Foundation, Inc. -# +# Copyright (C) 2014-2019 Free Software Foundation, Inc. +# # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. @@ -45,15 +45,15 @@ # NO_RELA_RELOCS - Don't include .rela.* sections in script # NON_ALLOC_DYN - Place dynamic sections after data segment. # TEXT_DYNAMIC - .dynamic in text segment, not data segment. -# EMBEDDED - whether this is for an embedded system. +# EMBEDDED - whether this is for an embedded system. # SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set # start address of shared library. # INPUT_FILES - INPUT command of files to always include # WRITABLE_RODATA - if set, the .rodata section should be writable # INIT_START, INIT_END - statements just before and just after -# combination of .init sections. +# combination of .init sections. # FINI_START, FINI_END - statements just before and just after -# combination of .fini sections. +# combination of .fini sections. # STACK_ADDR - start of a .stack section. # OTHER_SYMBOLS - symbols to place right at the end of the script. # ETEXT_NAME - name of a symbol for the end of the text section, @@ -123,7 +123,7 @@ 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 ${RELOCATING-0} : {${RELOCATING+ *(.got.plt)} *(.got) }" else GOT=".got ${RELOCATING-0} : { *(.got) }" GOTPLT=".got.plt ${RELOCATING-0} : { *(.got.plt) }" @@ -138,16 +138,16 @@ if test -z "${NO_SMALL_DATA}"; then { ${RELOCATING+${SBSS_START_SYMBOLS}} ${CREATE_SHLIB+*(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)} - *(.dynsbss) + ${RELOCATING+*(.dynsbss)} *(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*}) - *(.scommon) + ${RELOCATING+*(.scommon)} ${RELOCATING+${SBSS_END_SYMBOLS}} }" 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 ${RELOCATING-0} : + .sdata ${RELOCATING-0} : { ${RELOCATING+${SDATA_START_SYMBOLS}} ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)} @@ -219,7 +219,7 @@ FINI_ARRAY=".fini_array ${RELOCATING-0} : KEEP (*(.fini_array)) ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}} }" -CTOR=".ctors ${CONSTRUCTING-0} : +CTOR=".ctors ${CONSTRUCTING-0} : { ${CONSTRUCTING+${CTOR_START}} /* gcc uses crtbegin.o to find the start of @@ -255,10 +255,11 @@ DTOR=".dtors ${CONSTRUCTING-0} : KEEP (*(.dtors)) ${CONSTRUCTING+${DTOR_END}} }" -STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} : +STACK=".stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} : { - ${RELOCATING+_stack = .;} + ${RELOCATING+${USER_LABEL_PREFIX}_stack = .;} *(.stack) + ${RELOCATING+${STACK_SENTINEL}} }" TEXT_START_ADDR="SEGMENT_START(\"text-segment\", ${TEXT_START_ADDR})" @@ -272,7 +273,7 @@ else fi cat <> ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ +sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ cat >> ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ <> ldscripts/dyntmp.$$ +sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC >> ldscripts/dyntmp.$$ cat >> ldscripts/dyntmp.$$ <