* config/obj-coff.c: Fix formatting.
[deliverable/binutils-gdb.git] / bfd / coff-ppc.c
index 7dd4aadd258c7207c201b7c431dad759e07e4e27..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;
@@ -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.027343 seconds and 4 git commands to generate.