aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2011-10-13 09:47:51 +0000
committerNick Clifton <nickc@redhat.com>2011-10-13 09:47:51 +0000
commit9cd3e4e527d452aa52a528f05c167e9f3f888192 (patch)
treefda3e2659564cad2730e7c8ca1c3ad7228c606ce
parente103e98648ab7db6fbfe62faf3533ac4ffda743b (diff)
downloadfsf-binutils-gdb-9cd3e4e527d452aa52a528f05c167e9f3f888192.zip
fsf-binutils-gdb-9cd3e4e527d452aa52a528f05c167e9f3f888192.tar.gz
fsf-binutils-gdb-9cd3e4e527d452aa52a528f05c167e9f3f888192.tar.bz2
* elf32-arm.c (elf32_arm_final_link_relocate): Mark PLT calls via
stubs as resolved.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-arm.c25
2 files changed, 22 insertions, 8 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index e81f239..42ef646 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-13 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * elf32-arm.c (elf32_arm_final_link_relocate): Mark PLT calls via
+ stubs as resolved.
+
2011-10-11 Alan Modra <amodra@gmail.com>
PR binutils/13278
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 02d667f..bcf0aac3 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -8220,15 +8220,19 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
{
/* The target is out of reach, so redirect the
branch to the local stub for this function. */
-
stub_entry = elf32_arm_get_stub_entry (input_section,
sym_sec, h,
rel, globals,
stub_type);
- if (stub_entry != NULL)
- value = (stub_entry->stub_offset
- + stub_entry->stub_sec->output_offset
- + stub_entry->stub_sec->output_section->vma);
+ {
+ if (stub_entry != NULL)
+ value = (stub_entry->stub_offset
+ + stub_entry->stub_sec->output_offset
+ + stub_entry->stub_sec->output_section->vma);
+
+ if (plt_offset != (bfd_vma) -1)
+ *unresolved_reloc_p = FALSE;
+ }
}
else
{
@@ -8653,9 +8657,14 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
rel, globals,
stub_type);
if (stub_entry != NULL)
- value = (stub_entry->stub_offset
- + stub_entry->stub_sec->output_offset
- + stub_entry->stub_sec->output_section->vma);
+ {
+ value = (stub_entry->stub_offset
+ + stub_entry->stub_sec->output_offset
+ + stub_entry->stub_sec->output_section->vma);
+
+ if (plt_offset != (bfd_vma) -1)
+ *unresolved_reloc_p = FALSE;
+ }
/* If this call becomes a call to Arm, force BLX. */
if (globals->use_blx && (r_type == R_ARM_THM_CALL))