diff options
author | willnewton <willnewton> | 2013-04-29 09:48:31 +0000 |
---|---|---|
committer | willnewton <willnewton> | 2013-04-29 09:48:31 +0000 |
commit | b048d22f15d264c7aa55ccf8ae7fa050e22ad8eb (patch) | |
tree | bd1413133231db69bd394c7030ccf4392b96f521 /bfd/elf32-arm.c | |
parent | 27d87d125b58532115a6b88dc4048fb05a3c8fe3 (diff) | |
download | binutils-redhat-b048d22f15d264c7aa55ccf8ae7fa050e22ad8eb.tar.gz |
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.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 6201e60735..2ed4741b98 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 |