+2009-01-14 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-12-23 Nick Clifton <nickc@redhat.com>
* Import this patch from the mainline:
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);
+2009-01-14 Joseph Myers <joseph@codesourcery.com>
+
+ * ld-arm/thumb2-bl-undefweak.d, ld-arm/thumb2-bl-undefweak.s: New.
+ * ld-arm/arm-elf.exp: Run thumb2-bl-undefweak test.
+
2008-09-30 Alan Modra <amodra@bigpond.net.au>
* ld-elf/extract-symbol-1sec.d: Correct section lma.
run_dump_test "group-relocs-ldr-bad"
run_dump_test "group-relocs-ldrs-bad"
run_dump_test "group-relocs-ldc-bad"
+run_dump_test "thumb2-bl-undefweak"
run_dump_test "emit-relocs1"
# Exclude non-ARM-EABI targets.