daily update
[deliverable/binutils-gdb.git] / bfd / coff-ppc.c
index e77add6d30c7b5a496621233d622e84b6b54c5cf..4f8b15e177e4ccc66b4bbb0ef8347638563a21b2 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for PowerPC Microsoft Portable Executable files.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001
+   2000, 2001, 2002
    Free Software Foundation, Inc.
 
    Original version pieced together by Kim Knuttila (krk@cygnus.com)
@@ -204,13 +204,13 @@ ppc_coff_link_hash_table_create (abfd)
   struct ppc_coff_link_hash_table *ret;
   bfd_size_type amt = sizeof (struct ppc_coff_link_hash_table);
 
-  ret = (struct ppc_coff_link_hash_table *) bfd_alloc (abfd, amt);
+  ret = (struct ppc_coff_link_hash_table *) bfd_malloc (amt);
   if (ret == NULL)
     return NULL;
   if (! ppc_coff_link_hash_table_init (ret, abfd,
                                        ppc_coff_link_hash_newfunc))
     {
-      bfd_release (abfd, ret);
+      free (ret);
       return (struct bfd_link_hash_table *) NULL;
     }
   return &ret->root.root;
@@ -1195,7 +1195,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
        default:
          (*_bfd_error_handler)
            (_("%s: unsupported relocation type 0x%02x"),
-            bfd_get_filename (input_bfd), r_type);
+            bfd_archive_filename (input_bfd), r_type);
          bfd_set_error (bfd_error_bad_value);
          return false;
        case IMAGE_REL_PPC_TOCREL16:
@@ -1288,7 +1288,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
                      {
                        (*_bfd_error_handler)
                          (_("%s: Relocation for %s of %lx exceeds Toc size limit"),
-                          bfd_get_filename (input_bfd), name,
+                          bfd_archive_filename (input_bfd), name,
                           (unsigned long) our_toc_offset);
                        bfd_set_error (bfd_error_bad_value);
                        return false;
@@ -1345,7 +1345,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
              {
                (*_bfd_error_handler)
                  (_("%s: Relocation exceeds allocated TOC (%lx)"),
-                  bfd_get_filename (input_bfd),
+                  bfd_archive_filename (input_bfd),
                   (unsigned long) toc_section->_raw_size);
                bfd_set_error (bfd_error_bad_value);
                return false;
@@ -1402,7 +1402,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
            fprintf (stderr,
                    _("Warning: unsupported reloc %s <file %s, section %s>\n"),
                    howto->name,
-                   bfd_get_filename(input_bfd),
+                   bfd_archive_filename(input_bfd),
                    input_section->name);
 
            fprintf (stderr,"sym %ld (%s), r_vaddr %ld (%lx)\n",
@@ -1421,7 +1421,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
 
            (*_bfd_error_handler)
              (_("%s: Out of order IMGLUE reloc for %s"),
-              bfd_get_filename (input_bfd), my_name);
+              bfd_archive_filename (input_bfd), my_name);
            bfd_set_error (bfd_error_bad_value);
            return false;
          }
@@ -2176,10 +2176,6 @@ ppc_coff_reloc_type_lookup (abfd, code)
 
 #define RTYPE2HOWTO(cache_ptr, dst)  ppc_coff_rtype2howto (cache_ptr, dst)
 
-#ifndef COFF_IMAGE_WITH_PE
-static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR));
-#endif
-
 /* We use the special COFF backend linker, with our own special touch.  */
 
 #define coff_bfd_reloc_type_lookup   ppc_coff_reloc_type_lookup
@@ -2189,8 +2185,10 @@ static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR));
 
 #ifndef COFF_IMAGE_WITH_PE
 /* FIXME: This no longer works.  */
+#if 0
 #define coff_swap_sym_in_hook        ppc_coff_swap_sym_in_hook
 #endif
+#endif
 
 #define SELECT_RELOC(internal, howto) {internal.r_type=howto->type;}
 
@@ -2218,6 +2216,8 @@ static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR));
 #include "coffcode.h"
 \f
 #ifndef COFF_IMAGE_WITH_PE
+/* FIXME: This no longer works.  */
+#if 0
 /* FIXME:
    What we're trying to do here is allocate a toc section (early), and attach
    it to the last bfd to be processed. This avoids the problem of having a toc
@@ -2231,6 +2231,7 @@ static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR));
    3. Doing it on a "swap in" hook depends on when the "swap in" is called,
       and how often, etc. It's not clear to me that there isn't a hole here.
 */
+static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR));
 
 static void
 ppc_coff_swap_sym_in_hook (abfd, ext1, in1)
@@ -2273,6 +2274,7 @@ ppc_coff_swap_sym_in_hook (abfd, ext1, in1)
   return;
 }
 #endif
+#endif
 
 #ifndef COFF_IMAGE_WITH_PE
 
This page took 0.024558 seconds and 4 git commands to generate.