]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix PR ld/17277: bogus dynamic relocs and TEXTREL for ARM PC-relative relocs
authorRoland McGrath <mcgrathr@google.com>
Wed, 20 Aug 2014 17:12:57 +0000 (10:12 -0700)
committerRoland McGrath <mcgrathr@google.com>
Fri, 22 Aug 2014 17:59:49 +0000 (10:59 -0700)
commitb08b9f0894e43f0bb966f3ad9094a4405ce6f570
tree33663a930d7fb645808a727f100d1e95659a1f4a
parentb5d9ce2e84f5b750838c5ed115bfa69e27a6ac92
Fix PR ld/17277: bogus dynamic relocs and TEXTREL for ARM PC-relative relocs

bfd/
PR ld/17277
* elf32-arm.c (elf32_arm_check_relocs): Increment P->pc_count for
all reloc types with pc_relative set in the howto, not just for
R_ARM_REL32 and R_ARM_REL32_NOI.
(allocate_dynrelocs_for_symbol): Update comment.
(elf32_arm_gc_sweep_hook): For all reloc types with pc_relative
set in the howto, set call_reloc_p and may_need_local_target_p but
not may_become_dynamic_p; not only for R_ARM_REL32 and R_ARM_REL32_NOI.
(elf32_arm_check_relocs): Likewise.

ld/testsuite/
PR ld/17277
* ld-arm/pcrel-shared.s: New file.
* ld-arm/pcrel-shared.rd: New file.
* ld-arm/arm-elf.exp (armelftests_common): Add it.

(cherry picked from commit 469a34932ae4208240e98c843b01ea1f00892137)
bfd/ChangeLog
bfd/elf32-arm.c
ld/testsuite/ChangeLog
ld/testsuite/ld-arm/arm-elf.exp
ld/testsuite/ld-arm/pcrel-shared.rd [new file with mode: 0644]
ld/testsuite/ld-arm/pcrel-shared.s [new file with mode: 0644]