[ARM] Add FDPIC relocations definitions
authorChristophe Lyon <christophe.lyon@st.com>
Tue, 20 Mar 2018 09:54:59 +0000 (10:54 +0100)
committerChristophe Lyon <christophe.lyon@linaro.org>
Wed, 25 Apr 2018 20:51:53 +0000 (20:51 +0000)
commit188fd7aea619d9f66a822bad881d8f56892b60aa
treee223965ec6ff1ae6671f0fd34ef514dd882864f4
parent18a203380502fb3ee75633fd464faa3c83cec710
[ARM] Add FDPIC relocations definitions

Add FDPIC relocation definitions in BFD and gas.
Gas rejects them if the --fdpic option was not specified.

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

bfd/
* bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
(BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
(BFD_RELOC_ARM_FUNCDESC_VALUE): New.
* elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
(elf32_arm_howto_from_type): Take new members of
elf32_arm_howto_table_2 into account.
(elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
BFD_RELOC_ARM_FUNCDESC_VALUE.
* reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
BFD_RELOC_ARM_FUNCDESC_VALUE.

gas/
* config/tc-arm.c (reloc_names): Add gotfuncdesc, gotofffuncdesc,
funcdesc.
(md_apply_fix): Support the new relocations.
(tc_gen_reloc): Likewise.
* testsuite/gas/arm/reloc-fdpic.d: New.
* testsuite/gas/arm/reloc-fdpic.s: New.

include/
* elf/arm.h (R_ARM_GOTFUNCDESC, R_ARM_GOTOFFFUNCDESC)
(R_ARM_FUNCDESC)
(R_ARM_FUNCDESC_VALUE): Define new relocations.
bfd/ChangeLog
bfd/bfd-in2.h
bfd/elf32-arm.c
bfd/reloc.c
gas/ChangeLog
gas/config/tc-arm.c
gas/testsuite/gas/arm/reloc-fdpic.d [new file with mode: 0644]
gas/testsuite/gas/arm/reloc-fdpic.s [new file with mode: 0644]
include/ChangeLog
include/elf/arm.h
This page took 0.026313 seconds and 4 git commands to generate.