binutils-gdb/ld/scripttempl
Christophe Lyon 5c5a4843ec [ARM] Add TLS relocations for FDPIC.
Define and handle TLS relocations for FDPIC in BFD and gas.

In gas, the new relocations are rejected if the --fdpic option was not
specified.

We also define the __tdata_start symbol to mark the start of the
.tdata section. This allows FDPIC static binaries to find the start of
.tdata section, since phdr->p_vaddr of TLS segment is not a valid
value for FDPIC.

2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
	Mickaël Guêné  <mickael.guene@st.com>

	bfd/:
	* bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
	(BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
	relocations.
	* elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
	R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
	(elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
	R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
	(struct elf32_arm_link_hash_table): Update comment.
	(elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
	(IS_ARM_TLS_RELOC): Likewise.
	(elf32_arm_check_relocs): Likewise.
	(allocate_dynrelocs_for_symbol): Likewise.
	(elf32_arm_size_dynamic_sections): Update comment.
	* reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
	BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.

	gas/
	* config/tc-arm.c (reloc_names): Add TLSGD_FDPIC, TLSLDM_FDPIC,
	GOTTPOFF_FDIC relocations.
	(md_apply_fix): Handle the new TLS FDPIC relocations.
	(tc_gen_reloc): Likewise.
	(arm_fix_adjustable): Likewise.

	include/
	* elf/arm.h: Add R_ARM_TLS_GD32_FDPIC, R_ARM_TLS_LDM32_FDPIC,
	R_ARM_TLS_IE32_FDPIC.

	ld/
	* scripttempl/elf.sc: Define __tdata_start for .tdata section.
2018-04-25 20:57:02 +00:00
..
DWARF.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
README Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
aix.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
alpha.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
alphavms.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
aout.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
arclinux.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
armbpabi.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
avr.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
crisaout.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
dlx.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
elf.sc [ARM] Add TLS relocations for FDPIC. 2018-04-25 20:57:02 +00:00
elf32cr16.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
elf32cr16c.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
elf32crx.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
elf32msp430.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
elf32msp430_3.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
elf32xc16x.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
elf32xc16xl.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
elf32xc16xs.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
elf64hppa.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
elf_chaos.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
elfarc.sc ld whitespace fixes 2017-10-12 23:30:43 +10:30
elfarcv2.sc ld whitespace fixes 2017-10-12 23:30:43 +10:30
elfd10v.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
elfd30v.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
elfm68hc11.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
elfm68hc12.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
elfmicroblaze.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
elfxgate.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
elfxtensa.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
epiphany_4x4.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ft32.sc FT32 linker script cleanup 2016-07-06 18:58:10 -07:00
hppaelf.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
i386beos.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
i386go32.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
i386msdos.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ia64vms.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ip2k.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
iq2000.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
mcorepe.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
mep.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
mips.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
mipsbsd.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
mmo.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
moxie.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
nds32elf.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
pe.sc Remove PROVIDE() qualifiers from definition of __CTOR_LIST__ and __DTOR_LIST__ symbols in PE linker scripts. 2018-02-03 13:11:35 +00:00
pep.sc Remove PROVIDE() qualifiers from definition of __CTOR_LIST__ and __DTOR_LIST__ symbols in PE linker scripts. 2018-02-03 13:11:35 +00:00
pj.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ppcpe.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
pru.sc PRU LD Port 2016-12-31 12:04:11 +10:30
sh.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
tic4xcoff.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
tic30aout.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
tic30coff.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
tic54xcoff.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
tic80coff.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
v850.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
v850_rh850.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
vanilla.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
visium.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
xstormy16.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
z80.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
z8000.sc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30

README

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

The files in this directory are linker script templates.
genscripts.sh sets some shell variables, then sources
EMULATION.sc, to generate EMULATION.{x,xr,xu,xn,xbn} -- the script
files for default, -r, -Ur, -n, -N.

Copyright (C) 2012-2018 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.