diff options
Diffstat (limited to 'ld/scripttempl')
-rw-r--r-- | ld/scripttempl/elf.sc | 3 | ||||
-rw-r--r-- | ld/scripttempl/elf32sh-symbian.sc | 3 | ||||
-rw-r--r-- | ld/scripttempl/elf_chaos.sc | 3 | ||||
-rw-r--r-- | ld/scripttempl/elfi370.sc | 3 | ||||
-rw-r--r-- | ld/scripttempl/elfxtensa.sc | 3 |
5 files changed, 15 insertions, 0 deletions
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index f9f35f9..205d162 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -15,6 +15,7 @@ # OTHER_RELRO_SECTIONS - other than .data.rel.ro ... # (e.g. PPC32 .fixup, .got[12]) # OTHER_BSS_SECTIONS - other than .bss .sbss ... +# ATTRS_SECTIONS - at the end # OTHER_SECTIONS - at the end # EXECUTABLE_SYMBOLS - symbols that must be defined for an # executable (e.g., _DYNAMIC_LINK) @@ -96,6 +97,7 @@ test -z "${ETEXT_NAME}" && ETEXT_NAME=etext test -n "$CREATE_SHLIB$CREATE_PIE" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE="" test -z "$CREATE_SHLIB$CREATE_PIE" && test -n "$DATA_ADDR" && COMMONPAGESIZE="" test -n "$RELRO_NOW" && unset SEPARATE_GOTPLT +test -z "$ATTRS_SECTIONS" && ATTRS_SECTIONS=".gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }" DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))" DATA_SEGMENT_RELRO_END="" DATA_SEGMENT_END="" @@ -513,6 +515,7 @@ cat <<EOF ${TINY_BSS_SECTION} ${STACK_ADDR+${STACK}} + ${ATTRS_SECTIONS} ${OTHER_SECTIONS} ${RELOCATING+${OTHER_SYMBOLS}} ${RELOCATING+${STACKNOTE}} diff --git a/ld/scripttempl/elf32sh-symbian.sc b/ld/scripttempl/elf32sh-symbian.sc index ac10ceb..aab35d5 100644 --- a/ld/scripttempl/elf32sh-symbian.sc +++ b/ld/scripttempl/elf32sh-symbian.sc @@ -8,6 +8,7 @@ # OTHER_TEXT_SECTIONS - these get put in .text when relocating # OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ... # (e.g., .PARISC.global) +# ATTRS_SECTIONS - at the end # OTHER_SECTIONS - at the end # EXECUTABLE_SYMBOLS - symbols that must be defined for an # executable (e.g., _DYNAMIC_LINK) @@ -71,6 +72,7 @@ test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8" test "$LD_FLAG" = "N" && DATA_ADDR=. test -n "$CREATE_SHLIB$CREATE_PIE" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE="" test -z "$CREATE_SHLIB$CREATE_PIE" && test -n "$DATA_ADDR" && COMMONPAGESIZE="" +test -z "$ATTRS_SECTIONS" && ATTRS_SECTIONS=".gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }" DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))" DATA_SEGMENT_END="" if test -n "${COMMONPAGESIZE}"; then @@ -375,6 +377,7 @@ cat <<EOF .debug_varnames 0 : { *(.debug_varnames) } ${STACK_ADDR+${STACK}} + ${ATTRS_SECTIONS} ${OTHER_SECTIONS} ${RELOCATING+${OTHER_SYMBOLS}} ${RELOCATING+${STACKNOTE}} diff --git a/ld/scripttempl/elf_chaos.sc b/ld/scripttempl/elf_chaos.sc index 754e100..2725cf5 100644 --- a/ld/scripttempl/elf_chaos.sc +++ b/ld/scripttempl/elf_chaos.sc @@ -10,6 +10,7 @@ # OTHER_TEXT_SECTIONS - these get put in .text when relocating # OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ... # (e.g., .PARISC.global) +# ATTRS_SECTIONS - at the end # OTHER_SECTIONS - at the end # EXECUTABLE_SYMBOLS - symbols that must be defined for an # executable (e.g., _DYNAMIC_LINK) @@ -68,6 +69,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 -z "${ELFSIZE}" && ELFSIZE=32 test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8" +test -z "$ATTRS_SECTIONS" && ATTRS_SECTIONS=".gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }" test "$LD_FLAG" = "N" && DATA_ADDR=. INTERP=".interp ${RELOCATING-0} : { *(.interp) }" PLT=".plt ${RELOCATING-0} : { *(.plt) }" @@ -349,6 +351,7 @@ cat <<EOF .debug_varnames 0 : { *(.debug_varnames) } ${STACK_ADDR+${STACK}} + ${ATTRS_SECTIONS} ${OTHER_SECTIONS} ${RELOCATING+${OTHER_SYMBOLS}} } diff --git a/ld/scripttempl/elfi370.sc b/ld/scripttempl/elfi370.sc index 6b390fe..06cb3ba 100644 --- a/ld/scripttempl/elfi370.sc +++ b/ld/scripttempl/elfi370.sc @@ -8,6 +8,7 @@ # (e.g., .PARISC.milli) # OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ... # (e.g., .PARISC.global) +# ATTRS_SECTIONS - at the end # OTHER_SECTIONS - at the end # EXECUTABLE_SYMBOLS - symbols that must be defined for an # executable (e.g., _DYNAMIC_LINK) @@ -24,6 +25,7 @@ test -z "$ENTRY" && ENTRY=_start 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) }" @@ -212,6 +214,7 @@ SECTIONS .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } + ${ATTRS_SECTIONS} ${OTHER_SECTIONS} } EOF diff --git a/ld/scripttempl/elfxtensa.sc b/ld/scripttempl/elfxtensa.sc index efeaa02..29282aa 100644 --- a/ld/scripttempl/elfxtensa.sc +++ b/ld/scripttempl/elfxtensa.sc @@ -15,6 +15,7 @@ # OTHER_RELRO_SECTIONS - other than .data.rel.ro ... # (e.g. PPC32 .fixup, .got[12]) # OTHER_BSS_SECTIONS - other than .bss .sbss ... +# ATTRS_SECTIONS - at the end # OTHER_SECTIONS - at the end # EXECUTABLE_SYMBOLS - symbols that must be defined for an # executable (e.g., _DYNAMIC_LINK) @@ -109,6 +110,7 @@ test -z "${ETEXT_NAME}" && ETEXT_NAME=etext test -n "$CREATE_SHLIB$CREATE_PIE" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE="" test -z "$CREATE_SHLIB$CREATE_PIE" && test -n "$DATA_ADDR" && COMMONPAGESIZE="" test -n "$RELRO_NOW" && unset SEPARATE_GOTPLT +test -z "$ATTRS_SECTIONS" && ATTRS_SECTIONS=".gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }" DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))" DATA_SEGMENT_RELRO_END="" DATA_SEGMENT_END="" @@ -533,6 +535,7 @@ cat <<EOF ${TINY_BSS_SECTION} ${STACK_ADDR+${STACK}} + ${ATTRS_SECTIONS} ${OTHER_SECTIONS} ${RELOCATING+${OTHER_SYMBOLS}} ${RELOCATING+${STACKNOTE}} |