Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
authorRichard Henderson <rth@redhat.com>
Fri, 4 Jun 1999 13:25:23 +0000 (13:25 +0000)
committerRichard Henderson <rth@redhat.com>
Fri, 4 Jun 1999 13:25:23 +0000 (13:25 +0000)
        * elf32-ppc.c (ppc_elf_relocate_section): Don't barf on out of
        range undefweak symbols.
        * hash.c: Add missing comma after @xref{}
        * linker.c: Likewise.

bfd/ChangeLog
bfd/elf32-ppc.c
bfd/hash.c
bfd/linker.c

index d1e1af28c6f4143ae1961211170ff887b79a919c..3dc61ec3da2074c28e6667006d9d7a359bd8a88f 100644 (file)
@@ -1,3 +1,10 @@
+1999-06-04  Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+       * elf32-ppc.c (ppc_elf_relocate_section): Don't barf on out of
+       range undefweak symbols.
+       * hash.c: Add missing comma after @xref{}
+       * linker.c: Likewise.
+
 1999-06-04  Nick Clifton  <nickc@cygnus.com>
 
        * elfxx-target.h (ELF_MAXPAGESIZE): Produce an error message
index 25bb24ae4f946f15f0ed95272dbdeca244c1dbce..b84b863952fa7ffcedf089b05f029eacc59de910 100644 (file)
@@ -3751,47 +3751,52 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
                                    relocation,
                                    addend);
 
-      if (r != bfd_reloc_ok)
+      if (r == bfd_reloc_ok)
+       ;
+      else if (r == bfd_reloc_overflow)
        {
-         ret = false;
-         switch (r)
+         const char *name;
+
+         if (h != NULL)
            {
-           default:
-             break;
+             if (h->root.type == bfd_link_hash_undefweak
+                 && howto->pc_relative)
+               {
+                 /* 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.  */
 
-           case bfd_reloc_overflow:
-             {
-               const char *name;
-
-               if (h != NULL)
-                 name = h->root.root.string;
-               else
-                 {
-                   name = bfd_elf_string_from_elf_section (input_bfd,
-                                                           symtab_hdr->sh_link,
-                                                           sym->st_name);
-                   if (name == NULL)
-                     break;
-
-                   if (*name == '\0')
-                     name = bfd_section_name (input_bfd, sec);
-                 }
-
-               (*info->callbacks->reloc_overflow)(info,
-                                                  name,
-                                                  howto->name,
-                                                  (bfd_vma) 0,
-                                                  input_bfd,
-                                                  input_section,
-                                                  offset);
-             }
-             break;
+                 continue;
+               }
 
+             name = h->root.root.string;
+           }
+         else
+           {
+             name = bfd_elf_string_from_elf_section (input_bfd,
+                                                     symtab_hdr->sh_link,
+                                                     sym->st_name);
+             if (name == NULL)
+               continue;
+             if (*name == '\0')
+               name = bfd_section_name (input_bfd, sec);
            }
+
+         (*info->callbacks->reloc_overflow)(info,
+                                            name,
+                                            howto->name,
+                                            (bfd_vma) 0,
+                                            input_bfd,
+                                            input_section,
+                                            offset);
+         ret = false;
        }
+      else
+       ret = false;
     }
 
-
 #ifdef DEBUG
   fprintf (stderr, "\n");
 #endif
index 4c6e9877ce49b01e2af2b5008b77ea7f45cc5644..097304037df3cde37240aae71f41cb7e15cc70b3 100644 (file)
@@ -73,7 +73,7 @@ SUBSECTION
        The function <<bfd_hash_table_init>> take as an argument a
        function to use to create new entries.  For a basic hash
        table, use the function <<bfd_hash_newfunc>>.  @xref{Deriving
-       a New Hash Table Type} for why you would want to use a
+       a New Hash Table Type}, for why you would want to use a
        different value for this argument.
 
 @findex bfd_hash_allocate
index 947514c3fbdd86f5482dddad54d930d3e41450ae..b1fb6211f83fd42b281eebacff97791c6595824e 100644 (file)
@@ -74,7 +74,7 @@ SUBSECTION
 @cindex target vector (_bfd_link_hash_table_create)
        The linker routines must create a hash table, which must be
        derived from <<struct bfd_link_hash_table>> described in
-       <<bfdlink.c>>.  @xref{Hash Tables} for information on how to
+       <<bfdlink.c>>.  @xref{Hash Tables}, for information on how to
        create a derived hash table.  This entry point is called using
        the target vector of the linker output file.