]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* aoutx.h (NAME(aout,link_hash_table_create)): Allocate hash table
authorIan Lance Taylor <ian@airs.com>
Mon, 10 Jul 1995 18:07:17 +0000 (18:07 +0000)
committerIan Lance Taylor <ian@airs.com>
Mon, 10 Jul 1995 18:07:17 +0000 (18:07 +0000)
using bfd_alloc, not malloc.
* cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
* ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
* i386linux.c (linux_link_hash_table_create): Likewise.
* linker.c (_bfd_generic_link_hash_table_create): Likewise.
* sunos.c (sunos_link_hash_table_create): Likewise.

bfd/ChangeLog
bfd/cofflink.c
bfd/linker.c

index e0065965073ebcf2265cdac8e02c92af76d1c2af..c98c08d612d67f120fa155ff469895d26b6d4565 100644 (file)
@@ -5,6 +5,14 @@ Mon Jul 10 11:45:55 1995  Ken Raeburn  <raeburn@cygnus.com>
 
 Mon Jul 10 11:09:58 1995  Ian Lance Taylor  <ian@cygnus.com>
 
+       * aoutx.h (NAME(aout,link_hash_table_create)): Allocate hash table
+       using bfd_alloc, not malloc.
+       * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
+       * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
+       * i386linux.c (linux_link_hash_table_create): Likewise.
+       * linker.c (_bfd_generic_link_hash_table_create): Likewise.
+       * sunos.c (sunos_link_hash_table_create): Likewise.
+
        Based on patches from Eric Youngdale <eric@aib.com>:
        * elflink.h (NAME(bfd_elf,size_dynamic_sections)): If -Bsymbolic,
        output a DT_SYMBOLIC dynamic entry.
index efc830517833f68da263ab47c9f5d1e962cfbcef..362a718760f6f64b4e4c0fa16ca242ce68679fbd 100644 (file)
@@ -190,7 +190,7 @@ _bfd_coff_link_hash_table_create (abfd)
   struct coff_link_hash_table *ret;
 
   ret = ((struct coff_link_hash_table *)
-        malloc (sizeof (struct coff_link_hash_table)));
+        bfd_alloc (abfd, sizeof (struct coff_link_hash_table)));
   if (ret == NULL)
     {
       bfd_set_error (bfd_error_no_memory);
index 5aae5459fd42ac76bc963e9ab388785d7a33557d..ef9469b28bcee5b7db85394726af75ce48f28442 100644 (file)
@@ -597,12 +597,12 @@ _bfd_generic_link_hash_table_create (abfd)
   struct generic_link_hash_table *ret;
 
   ret = ((struct generic_link_hash_table *)
-        malloc (sizeof (struct generic_link_hash_table)));
-  if (!ret)
-      {
-       bfd_set_error (bfd_error_no_memory);
-       return (struct bfd_link_hash_table *) NULL;
-      }
+        bfd_alloc (abfd, sizeof (struct generic_link_hash_table)));
+  if (ret == NULL)
+    {
+      bfd_set_error (bfd_error_no_memory);
+      return (struct bfd_link_hash_table *) NULL;
+    }
   if (! _bfd_link_hash_table_init (&ret->root, abfd,
                                   generic_link_hash_newfunc))
     {