From: Christophe Lyon Date: Tue, 20 Mar 2018 09:55:45 +0000 (+0100) Subject: [ARM] FDPIC: Translate R_ARM_TARGET2 relocation into R_ARM_GOT32 relocation for FDPIC... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=29e9b073e3b356aae4c249bf3e265b2a608aea6c;p=binutils-gdb.git [ARM] FDPIC: Translate R_ARM_TARGET2 relocation into R_ARM_GOT32 relocation for FDPIC platform 2018-04-25 Christophe Lyon Mickaël Guêné bfd/ * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case for R_ARM_TARGET2. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index bd7c6aeea40..766341a54f8 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2018-04-25 Christophe Lyon + Mickaël Guêné + + * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case + for R_ARM_TARGET2. + 2018-04-25 Christophe Lyon Mickaël Guêné diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 35b60ed9f5b..c2f48046200 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -8957,7 +8957,9 @@ bfd_elf32_arm_set_target_params (struct bfd *output_bfd, return; globals->target1_is_rel = params->target1_is_rel; - if (strcmp (params->target2_type, "rel") == 0) + if (globals->fdpic_p) + globals->target2_reloc = R_ARM_GOT32; + else if (strcmp (params->target2_type, "rel") == 0) globals->target2_reloc = R_ARM_REL32; else if (strcmp (params->target2_type, "abs") == 0) globals->target2_reloc = R_ARM_ABS32;