From 188fd7aea619d9f66a822bad881d8f56892b60aa Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Tue, 20 Mar 2018 10:54:59 +0100 Subject: [ARM] Add FDPIC relocations definitions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add FDPIC relocation definitions in BFD and gas. Gas rejects them if the --fdpic option was not specified. 2018-04-25 Christophe Lyon Mickaël Guêné 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/reloc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'bfd/reloc.c') diff --git a/bfd/reloc.c b/bfd/reloc.c index 80db0c9..e78e582 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -3208,6 +3208,17 @@ ENUMDOC Low and High halfword relocations for MOVW and MOVT instructions. ENUM + BFD_RELOC_ARM_GOTFUNCDESC +ENUMX + BFD_RELOC_ARM_GOTOFFFUNCDESC +ENUMX + BFD_RELOC_ARM_FUNCDESC +ENUMX + BFD_RELOC_ARM_FUNCDESC_VALUE +ENUMDOC + ARM FDPIC specific relocations. + +ENUM BFD_RELOC_ARM_JUMP_SLOT ENUMX BFD_RELOC_ARM_GLOB_DAT -- cgit v1.1