aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
diff options
context:
space:
mode:
authorWill Newton <willnewton@sourceware.org>2013-04-29 09:48:32 +0000
committerWill Newton <willnewton@sourceware.org>2013-04-29 09:48:32 +0000
commitaba8c3de87953e47e5ab45f63789363a22aa0841 (patch)
treeae9809d5149ebf56da13a3201e29468ee63a058a /bfd/elf32-arm.c
parent2810e26c6afef9ada4446fda70bfa621dcf52d35 (diff)
downloadgdb-aba8c3de87953e47e5ab45f63789363a22aa0841.zip
gdb-aba8c3de87953e47e5ab45f63789363a22aa0841.tar.gz
gdb-aba8c3de87953e47e5ab45f63789363a22aa0841.tar.bz2
bfd/efl32-arm.c: Fix handling of IRELATIVE relocs.
bfd/ChangeLog: 2013-04-24 Will Newton <will.newton@linaro.org> * elf32-arm.c (elf32_arm_populate_plt_entry): Call elf32_arm_add_dynreloc when emitting R_ARM_IRELATIVE relocs. ld/testsuite/ChangeLog: 2013-04-24 Will Newton <will.newton@linaro.org> * ld-arm/arm-elf.exp: Add IFUNC test 17. * ld-arm/ifunc-17.dd: New file. * ld-arm/ifunc-17.gd: Likewise. * ld-arm/ifunc-17.rd: Likewise. * ld-arm/ifunc-17.s: Likweise. * ld-arm/ifunc-1.rd: Reorder relocs to match linker output. * ld-arm/ifunc-2.rd: Likewise. * ld-arm/ifunc-5.rd: Likewise. * ld-arm/ifunc-6.rd: Likewise.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r--bfd/elf32-arm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 6201e60..2ed4741 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -7699,8 +7699,13 @@ elf32_arm_populate_plt_entry (bfd *output_bfd, struct bfd_link_info *info,
sgot->contents + got_offset);
}
- loc = srel->contents + plt_index * RELOC_SIZE (htab);
- SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
+ if (dynindx == -1)
+ elf32_arm_add_dynreloc (output_bfd, info, srel, &rel);
+ else
+ {
+ loc = srel->contents + plt_index * RELOC_SIZE (htab);
+ SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
+ }
}
/* Some relocations map to different relocations depending on the