* elf32-arm.c (elf32_arm_final_link_relocate): Mark PLT calls via

stubs as resolved.
This commit is contained in:
Nick Clifton 2011-10-13 09:47:51 +00:00
parent e103e98648
commit 9cd3e4e527
2 changed files with 22 additions and 8 deletions

View file

@ -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> 2011-10-11 Alan Modra <amodra@gmail.com>
PR binutils/13278 PR binutils/13278

View file

@ -8220,15 +8220,19 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
{ {
/* The target is out of reach, so redirect the /* The target is out of reach, so redirect the
branch to the local stub for this function. */ branch to the local stub for this function. */
stub_entry = elf32_arm_get_stub_entry (input_section, stub_entry = elf32_arm_get_stub_entry (input_section,
sym_sec, h, sym_sec, h,
rel, globals, rel, globals,
stub_type); stub_type);
if (stub_entry != NULL) {
value = (stub_entry->stub_offset if (stub_entry != NULL)
+ stub_entry->stub_sec->output_offset value = (stub_entry->stub_offset
+ stub_entry->stub_sec->output_section->vma); + stub_entry->stub_sec->output_offset
+ stub_entry->stub_sec->output_section->vma);
if (plt_offset != (bfd_vma) -1)
*unresolved_reloc_p = FALSE;
}
} }
else else
{ {
@ -8653,9 +8657,14 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
rel, globals, rel, globals,
stub_type); stub_type);
if (stub_entry != NULL) if (stub_entry != NULL)
value = (stub_entry->stub_offset {
+ stub_entry->stub_sec->output_offset value = (stub_entry->stub_offset
+ stub_entry->stub_sec->output_section->vma); + 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 this call becomes a call to Arm, force BLX. */
if (globals->use_blx && (r_type == R_ARM_THM_CALL)) if (globals->use_blx && (r_type == R_ARM_THM_CALL))