* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
authorEric Botcazou <ebotcazou@libertysurf.fr>
Wed, 1 Feb 2006 22:03:38 +0000 (22:03 +0000)
committerEric Botcazou <ebotcazou@libertysurf.fr>
Wed, 1 Feb 2006 22:03:38 +0000 (22:03 +0000)
for call-to-undefweak reloc overflow.

bfd/ChangeLog
bfd/elfxx-sparc.c

index 3a0bb0a..5bd1e34 100644 (file)
@@ -1,3 +1,8 @@
+2006-02-01  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
+       for call-to-undefweak reloc overflow.
+
 2006-01-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
index 5e8fb20..802206f 100644 (file)
@@ -3373,7 +3373,18 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                  break;
 
                if (h != NULL)
-                 name = NULL;
+                 {
+                   /* Assume this is a call protected by other code that
+                      detect the symbol is undefined.  If this is the case,
+                      we can safely ignore the overflow.  If not, the
+                      program is hosed anyway, and a little warning isn't
+                      going to help.  */
+                   if (h->root.type == bfd_link_hash_undefweak
+                       && howto->pc_relative)
+                     break;
+
+                   name = NULL;
+                 }
                else
                  {
                    name = bfd_elf_string_from_elf_section (input_bfd,