diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 8f01ddf..ea17423 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2008-11-25 Joseph Myers <joseph@codesourcery.com> + + * elf32-arm.c (elf32_arm_final_link_relocate): Do not turn + branches to undefine weak symbols into branches to the next + instruction if creating PLT entries for those symbols. + 2008-11-25 Nick Clifton <nickc@redhat.com> * elflink.c (is_reloc_section): New function. Returns true if the diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 5b78dc3..cd5a9bf 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -6360,8 +6360,9 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, int thumb2 = using_thumb2 (globals); /* A branch to an undefined weak symbol is turned into a jump to - the next instruction. */ - if (h && h->root.type == bfd_link_hash_undefweak) + the next instruction unless a PLT entry will be created. */ + if (h && h->root.type == bfd_link_hash_undefweak + && !(splt != NULL && h->plt.offset != (bfd_vma) -1)) { bfd_put_16 (input_bfd, 0xe000, hit_data); bfd_put_16 (input_bfd, 0xbf00, hit_data + 2); |