* elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
authorAlan Modra <amodra@gmail.com>
Sat, 12 Jun 2004 11:30:10 +0000 (11:30 +0000)
committerAlan Modra <amodra@gmail.com>
Sat, 12 Jun 2004 11:30:10 +0000 (11:30 +0000)
overflow on branches to undefweaks.

bfd/ChangeLog
bfd/elf64-x86-64.c

index 2de9b6cc06d6b9f800469f02024cdfb1c80ccd05..63bd2ad4a0d8d4f9fe71ec28d5bff0d6821454c9 100644 (file)
@@ -1,3 +1,8 @@
+2004-06-12  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
+       overflow on branches to undefweaks.
+
 2004-06-11  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
 
        * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
index f9eb7db643435b315a58eb5a2963544676b7e09f..a701e45cef59373e2f6f980c0cb03d52e2c4a88a 100644 (file)
@@ -2420,6 +2420,11 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
 
          if (r == bfd_reloc_overflow)
            {
+             if (h != NULL
+                 && h->root.type == bfd_link_hash_undefweak
+                 && howto->pc_relative)
+               /* Ignore reloc overflow on branches to undefweak syms.  */
+               continue;
 
              if (! ((*info->callbacks->reloc_overflow)
                     (info, name, howto->name, (bfd_vma) 0,