summaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2011-10-13 09:47:50 +0000
committerNick Clifton <nickc@redhat.com>2011-10-13 09:47:50 +0000
commit589342bc49be60680807fa478fc220591fb06942 (patch)
treea4c0cdeb20852f772cbbccf3e29faa2de7ba533a /bfd/elf32-arm.c
parent659479630f5fd1ae422104924c6ec80315390c47 (diff)
downloadbinutils-redhat-589342bc49be60680807fa478fc220591fb06942.tar.gz
* elf32-arm.c (elf32_arm_final_link_relocate): Mark PLT calls via
stubs as resolved.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r--bfd/elf32-arm.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 02d667f440..bcf0aac319 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))