aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
diff options
context:
space:
mode:
authorJiong Wang <jiong.wang@arm.com>2016-11-24 14:01:53 +0000
committerJiong Wang <jiong.wang@arm.com>2016-11-24 14:01:53 +0000
commit1dcb9720d62cd053a72c31881b7724ce9f74332c (patch)
tree0717063f07a5d5a9860159ac7c92167d5afac5bc /bfd/elf32-arm.c
parent51750acd087cc20ae3f72393fa897d9e3059c65d (diff)
downloadgdb-1dcb9720d62cd053a72c31881b7724ce9f74332c.zip
gdb-1dcb9720d62cd053a72c31881b7724ce9f74332c.tar.gz
gdb-1dcb9720d62cd053a72c31881b7724ce9f74332c.tar.bz2
[ARM] Bind defined symbol locally in PIE
bfd/ PR target/20737 * elf32-arm.c (elf32_arm_final_link_relocate): Bind defined symbol locally in PIE. ld/ * testsuite/ld-arm/pie-bind-locally-a.s: New test source. * testsuite/ld-arm/pie-bind-locally-b.s: Likewise. * testsuite/ld-arm/pie-bind-locally.d: New testcase. * testsuite/ld-arm/arm-elf.exp: Run new testcase.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r--bfd/elf32-arm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index b1bec39..8a20260 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -10147,7 +10147,8 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
else if (h != NULL
&& h->dynindx != -1
&& (!bfd_link_pic (info)
- || !SYMBOLIC_BIND (info, h)
+ || !(bfd_link_pie (info)
+ || SYMBOLIC_BIND (info, h))
|| !h->def_regular))
outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
else