PR25243, static linking with exceptions and iostream is broken on ARM
PR 25243 * emulparams/armelf.sh (OTHER_READONLY_SECTIONS): Move definition of __exidx_start and __exidx_end into ARM.exidx. * emulparams/armelf_linux_eabi.sh (OTHER_READONLY_SECTIONS): Likewise. * emulparams/armsymbian.sh (OTHER_READONLY_SECTIONS): Similarly. * emulparams/elf32_tic6x_le.sh (OTHER_READONLY_SECTIONS): Similarly. * emulparams/armelf_fuchsia.sh: Source armelf_linux_eabi.sh, just redefining TEXT_START_ADDR. * emulparams/armelf_linux_fdpiceabi.sh: Source armelf_linux_eabi.sh, adding to OTHER_READONLY_SECTIONS.
This commit is contained in:
parent
1769380a11
commit
6e9ed99753
13
ld/ChangeLog
13
ld/ChangeLog
@ -1,3 +1,16 @@
|
||||
2019-12-05 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 25243
|
||||
* emulparams/armelf.sh (OTHER_READONLY_SECTIONS): Move definition
|
||||
of __exidx_start and __exidx_end into ARM.exidx.
|
||||
* emulparams/armelf_linux_eabi.sh (OTHER_READONLY_SECTIONS): Likewise.
|
||||
* emulparams/armsymbian.sh (OTHER_READONLY_SECTIONS): Similarly.
|
||||
* emulparams/elf32_tic6x_le.sh (OTHER_READONLY_SECTIONS): Similarly.
|
||||
* emulparams/armelf_fuchsia.sh: Source armelf_linux_eabi.sh,
|
||||
just redefining TEXT_START_ADDR.
|
||||
* emulparams/armelf_linux_fdpiceabi.sh: Source armelf_linux_eabi.sh,
|
||||
adding to OTHER_READONLY_SECTIONS.
|
||||
|
||||
2019-12-05 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 25244
|
||||
|
@ -26,9 +26,12 @@ OTHER_SECTIONS='
|
||||
ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }'
|
||||
OTHER_READONLY_SECTIONS="
|
||||
.ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) }
|
||||
${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); }
|
||||
.ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) }
|
||||
${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }"
|
||||
.ARM.exidx ${RELOCATING-0} :
|
||||
{
|
||||
${RELOCATING+PROVIDE_HIDDEN (__exidx_start = .);}
|
||||
*(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*})
|
||||
${RELOCATING+PROVIDE_HIDDEN (__exidx_end = .);}
|
||||
}"
|
||||
|
||||
DATA_START_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__data_start = .${CREATE_SHLIB+)};"
|
||||
|
||||
|
@ -1,32 +1,3 @@
|
||||
ARCH=arm
|
||||
SCRIPT_NAME=elf
|
||||
OUTPUT_FORMAT="elf32-littlearm"
|
||||
BIG_OUTPUT_FORMAT="elf32-bigarm"
|
||||
LITTLE_OUTPUT_FORMAT="elf32-littlearm"
|
||||
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
|
||||
COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
|
||||
TEMPLATE_NAME=elf
|
||||
EXTRA_EM_FILE=armelf
|
||||
GENERATE_SHLIB_SCRIPT=yes
|
||||
GENERATE_PIE_SCRIPT=yes
|
||||
|
||||
DATA_START_SYMBOLS='PROVIDE (__data_start = .);';
|
||||
OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)'
|
||||
OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ = .${CREATE_SHLIB+)};"
|
||||
OTHER_BSS_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_end__ = .${CREATE_SHLIB+)}; ${CREATE_SHLIB+PROVIDE (}__bss_end__ = .${CREATE_SHLIB+)};"
|
||||
OTHER_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__end__ = .${CREATE_SHLIB+)};"
|
||||
OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
|
||||
source_sh ${srcdir}/emulparams/armelf_linux_eabi.sh
|
||||
|
||||
TEXT_START_ADDR=0x00001000
|
||||
TARGET2_TYPE=got-rel
|
||||
|
||||
# ARM does not support .s* sections.
|
||||
NO_SMALL_DATA=yes
|
||||
|
||||
# Use the ARM ABI-compliant exception-handling sections.
|
||||
OTHER_READONLY_SECTIONS="
|
||||
.ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) }
|
||||
${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); }
|
||||
.ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) }
|
||||
${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }"
|
||||
|
||||
|
@ -3,7 +3,9 @@ source_sh ${srcdir}/emulparams/armelf_linux.sh
|
||||
# Use the ARM ABI-compliant exception-handling sections.
|
||||
OTHER_READONLY_SECTIONS="
|
||||
.ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) }
|
||||
${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); }
|
||||
.ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) }
|
||||
${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }"
|
||||
|
||||
.ARM.exidx ${RELOCATING-0} :
|
||||
{
|
||||
${RELOCATING+PROVIDE_HIDDEN (__exidx_start = .);}
|
||||
*(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*})
|
||||
${RELOCATING+PROVIDE_HIDDEN (__exidx_end = .);}
|
||||
}"
|
||||
|
@ -1,15 +1,10 @@
|
||||
source_sh ${srcdir}/emulparams/armelf_linux.sh
|
||||
source_sh ${srcdir}/emulparams/armelf_linux_eabi.sh
|
||||
|
||||
OUTPUT_FORMAT="elf32-littlearm-fdpic"
|
||||
BIG_OUTPUT_FORMAT="elf32-bigarm-fdpic"
|
||||
LITTLE_OUTPUT_FORMAT="elf32-littlearm-fdpic"
|
||||
|
||||
# Use the ARM ABI-compliant exception-handling sections.
|
||||
OTHER_READONLY_SECTIONS="
|
||||
.ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) }
|
||||
${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); }
|
||||
.ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) }
|
||||
${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }
|
||||
OTHER_READONLY_SECTIONS="${OTHER_READONLY_SECTIONS}
|
||||
.rofixup : {
|
||||
${RELOCATING+__ROFIXUP_LIST__ = .;}
|
||||
*(.rofixup)
|
||||
|
@ -13,10 +13,13 @@ EMBEDDED=yes
|
||||
# .ARM.exidx$${Base,Limit} symbols.
|
||||
OTHER_READONLY_SECTIONS="
|
||||
.ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) }
|
||||
${RELOCATING+ PROVIDE_HIDDEN (.ARM.exidx\$\$Base = .); }
|
||||
${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); }
|
||||
.ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) }
|
||||
${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }
|
||||
${RELOCATING+ PROVIDE_HIDDEN (.ARM.exidx\$\$Limit = .); }"
|
||||
.ARM.exidx ${RELOCATING-0} :
|
||||
{
|
||||
${RELOCATING+PROVIDE_HIDDEN (.ARM.exidx\$\$Base = .);}
|
||||
${RELOCATING+PROVIDE_HIDDEN (__exidx_start = .);}
|
||||
*(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*})
|
||||
${RELOCATING+PROVIDE_HIDDEN (__exidx_end = .);}
|
||||
${RELOCATING+PROVIDE_HIDDEN (.ARM.exidx\$\$Limit = .);}
|
||||
}"
|
||||
|
||||
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
|
||||
|
@ -32,9 +32,12 @@ SBSS_NAME="bss"
|
||||
BSS_NAME="far"
|
||||
OTHER_READONLY_SECTIONS="
|
||||
.c6xabi.extab ${RELOCATING-0} : { *(.c6xabi.extab${RELOCATING+* .gnu.linkonce.c6xabiextab.*}) }
|
||||
${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); }
|
||||
.c6xabi.exidx ${RELOCATING-0} : { *(.c6xabi.exidx${RELOCATING+* .gnu.linkonce.c6xabiexidx.*}) }
|
||||
${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }"
|
||||
.c6xabi.exidx ${RELOCATING-0} :
|
||||
{
|
||||
${RELOCATING+PROVIDE_HIDDEN (__exidx_start = .);}
|
||||
*(.c6xabi.exidx${RELOCATING+* .gnu.linkonce.c6xabiexidx.*})
|
||||
${RELOCATING+PROVIDE_HIDDEN (__exidx_end = .);}
|
||||
}"
|
||||
OTHER_SDATA_SECTIONS=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.*}) }"
|
||||
OTHER_READONLY_RELOC_SECTIONS="
|
||||
.rel.rodata ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.*}) }
|
||||
|
Loading…
Reference in New Issue
Block a user