This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[ARM-FDPIC 08/12] [ARM] FDPIC: Translate R_ARM_TARGET2 relocation into R_ARM_GOT32 relocation for FDPIC platform
- From: Christophe Lyon <christophe dot lyon at st dot com>
- To: <binutils at sourceware dot org>
- Date: Thu, 22 Mar 2018 15:38:26 +0100
- Subject: [ARM-FDPIC 08/12] [ARM] FDPIC: Translate R_ARM_TARGET2 relocation into R_ARM_GOT32 relocation for FDPIC platform
- References: <20180322143850.1766-1-christophe.lyon@st.com>
2018-XX-XX Christophe Lyon <christophe.lyon@st.com>
Mickaël Guêné <mickael.guene@st.com>
bfd/
* elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
for R_ARM_TARGET2.
---
bfd/elf32-arm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 6ba4ee4..72d25c8 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;
--
2.6.3