mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
9203ba999f
* elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec. (elfNN_ia64_dynamic_symbol_p): Change info->shared into !info->executable. (get_fptr): For -pie create .opd as writable section and create .rela.opd as well. (elfNN_ia64_check_relocs): Change info->shared into !info->executable. (allocate_fptr): Likewise. (allocate_dynrel_entries): Account for a relative reloc for -pie @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr for undefweak symbol. Account for an IPLT reloc in .rela.opd section if -pie. (set_got_entry): Don't create a relative reloc if -pie want_ltoff_fptr for undefweak symbol. (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie. (elfNN_ia64_relocate_section): Emit a relative reloc for -pie @fptr(). * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol even if -pie. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. ld/ * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Don't include .opd if -pie. (OTHER_READWRITE_SECTIONS): Include .opd if -pie. * scripttempl/elf.sc: Use SHLIB_DATA_ADDR instead of DATA_ADDR if -pie.
34 lines
1.3 KiB
Bash
34 lines
1.3 KiB
Bash
# See genscripts.sh and ../scripttempl/elf.sc for the meaning of these.
|
|
SCRIPT_NAME=elf
|
|
ELFSIZE=64
|
|
TEMPLATE_NAME=elf32
|
|
EXTRA_EM_FILE=needrelax
|
|
OUTPUT_FORMAT="elf64-ia64-little"
|
|
ARCH=ia64
|
|
MACHINE=
|
|
MAXPAGESIZE=0x10000
|
|
# FIXME: It interferes with linker relaxation. Disable it until it is
|
|
# fixed.
|
|
if test "0" = "1" -a -n "$CREATE_SHLIB"; then
|
|
# Optimize shared libraries for 16K page size
|
|
COMMONPAGESIZE=0x4000
|
|
fi
|
|
TEXT_START_ADDR="0x4000000000000000"
|
|
DATA_ADDR="0x6000000000000000 + (. & (${MAXPAGESIZE} - 1))"
|
|
GENERATE_SHLIB_SCRIPT=yes
|
|
GENERATE_PIE_SCRIPT=yes
|
|
NOP=0x00300000010070000002000001000400 # a bundle full of nops
|
|
OTHER_GOT_SECTIONS="
|
|
.IA_64.pltoff ${RELOCATING-0} : { *(.IA_64.pltoff) }"
|
|
OTHER_PLT_RELOC_SECTIONS="
|
|
.rela.IA_64.pltoff ${RELOCATING-0} : { *(.rela.IA_64.pltoff) }"
|
|
OTHER_READONLY_SECTIONS=
|
|
OTHER_READWRITE_SECTIONS=
|
|
test -z "$CREATE_PIE" && OTHER_READONLY_SECTIONS="
|
|
.opd ${RELOCATING-0} : { *(.opd) }"
|
|
test -n "$CREATE_PIE" && OTHER_READWRITE_SECTIONS="
|
|
.opd ${RELOCATING-0} : { *(.opd) }"
|
|
OTHER_READONLY_SECTIONS="${OTHER_READONLY_SECTIONS}
|
|
.IA_64.unwind_info ${RELOCATING-0} : { *(.IA_64.unwind_info${RELOCATING+* .gnu.linkonce.ia64unwi.*}) }
|
|
.IA_64.unwind ${RELOCATING-0} : { *(.IA_64.unwind${RELOCATING+* .gnu.linkonce.ia64unw.*}) }"
|