aboutsummaryrefslogtreecommitdiff
path: root/include/elf/arm.h
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@st.com>2018-03-20 10:55:29 +0100
committerChristophe Lyon <christophe.lyon@linaro.org>2018-04-25 20:57:02 +0000
commit5c5a4843ec385a60954fbbc4bcf5b64763639bd3 (patch)
tree0271d460bc3533d64c2bcc94b3e01925d7fbbe19 /include/elf/arm.h
parent7801f98f84fefa495941c86e2a859ea8c6c37770 (diff)
downloadgdb-5c5a4843ec385a60954fbbc4bcf5b64763639bd3.zip
gdb-5c5a4843ec385a60954fbbc4bcf5b64763639bd3.tar.gz
gdb-5c5a4843ec385a60954fbbc4bcf5b64763639bd3.tar.bz2
[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.
Diffstat (limited to 'include/elf/arm.h')
-rw-r--r--include/elf/arm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/elf/arm.h b/include/elf/arm.h
index 158f7b1..fdae08a 100644
--- a/include/elf/arm.h
+++ b/include/elf/arm.h
@@ -244,6 +244,9 @@ START_RELOC_NUMBERS (elf_arm_reloc_type)
RELOC_NUMBER (R_ARM_GOTOFFFUNCDESC, 162)
RELOC_NUMBER (R_ARM_FUNCDESC, 163)
RELOC_NUMBER (R_ARM_FUNCDESC_VALUE, 164)
+ RELOC_NUMBER (R_ARM_TLS_GD32_FDPIC, 165)
+ RELOC_NUMBER (R_ARM_TLS_LDM32_FDPIC, 166)
+ RELOC_NUMBER (R_ARM_TLS_IE32_FDPIC, 167)
/* Extensions? R=read-only? */
RELOC_NUMBER (R_ARM_RXPC25, 249)