e901de8951
* elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the .xt.lit.plt section. (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section and allocate memory for it. (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output section to the .got.loc section. (elf_xtensa_finish_dynamic_sections): Fix up call to elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to the address of .got.loc. (relax_property_section): Shrink .got.loc to match changes in any literal table section. (xtensa_is_property_section): Change to match xtensa_get_property_section_name. (xtensa_is_littable_section): New. ld ChangeLog: * emulparams/elf32xtensa.sh (OTHER_READONLY_SECTIONS): Replace .xt.lit with new .got.loc section. (OTHER_READWRITE_SECTIONS): Do not combine linkonce sections for non-relocating links. (OTHER_SECTIONS): Add .xt.lit here. Change it to keep linkonce sections separate for non-relocating links; likewise for .xt.insn.
33 lines
899 B
Bash
33 lines
899 B
Bash
# First set some configuration-specific variables
|
|
. ${srcdir}/emulparams/xtensa-config.sh
|
|
|
|
# See genscripts.sh and ../scripttempl/elfxtensa.sc for the meaning of these.
|
|
SCRIPT_NAME=elfxtensa
|
|
TEMPLATE_NAME=elf32
|
|
EXTRA_EM_FILE=xtensaelf
|
|
OUTPUT_FORMAT=undefined
|
|
BIG_OUTPUT_FORMAT="elf32-xtensa-be"
|
|
LITTLE_OUTPUT_FORMAT="elf32-xtensa-le"
|
|
TEXT_START_ADDR=0x400000
|
|
NONPAGED_TEXT_START_ADDR=0x400000
|
|
ARCH=xtensa
|
|
MACHINE=
|
|
GENERATE_SHLIB_SCRIPT=yes
|
|
GENERATE_COMBRELOC_SCRIPT=yes
|
|
NO_SMALL_DATA=yes
|
|
OTHER_READONLY_SECTIONS='
|
|
.got.loc : { *(.got.loc) }
|
|
.xt_except_table : { KEEP (*(.xt_except_table)) }
|
|
'
|
|
OTHER_READWRITE_SECTIONS="
|
|
.xt_except_desc :
|
|
{
|
|
*(.xt_except_desc${RELOCATING+ .gnu.linkonce.h.*})
|
|
${RELOCATING+*(.xt_except_desc_end)}
|
|
}
|
|
"
|
|
OTHER_SECTIONS="
|
|
.xt.lit : { *(.xt.lit${RELOCATING+ .xt.lit.* .gnu.linkonce.p.*}) }
|
|
.xt.insn : { *(.xt.insn${RELOCATING+ .gnu.linkonce.x.*}) }
|
|
"
|