]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* i386linux.c (linux_link_hash_table_create): Allocate table
authorAlan Modra <amodra@gmail.com>
Sun, 10 Feb 2013 04:01:15 +0000 (04:01 +0000)
committerAlan Modra <amodra@gmail.com>
Sun, 10 Feb 2013 04:01:15 +0000 (04:01 +0000)
with bfd_zmalloc, not bfd_alloc.
* pdp11.c (link_hash_table_create): Allocate table with
bfd_malloc, not bfd_alloc.
* elf32-bfin.c (bfinfdpic_elf_link_hash_table_create): Allocate table
with bfd_zmalloc, not bfd_zalloc.
(bfin_link_hash_table_create): Likewise.
* elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
* elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.

bfd/ChangeLog
bfd/elf32-bfin.c
bfd/elf32-frv.c
bfd/elf64-hppa.c
bfd/i386linux.c
bfd/pdp11.c

index cd86047403a0b975f5b5d71e5b259d13f1853854..4342fa4b541f0514e71989043c51d58788acd86a 100644 (file)
@@ -1,3 +1,15 @@
+2013-02-10  Alan Modra  <amodra@gmail.com>
+
+       * i386linux.c (linux_link_hash_table_create): Allocate table
+       with bfd_zmalloc, not bfd_alloc.
+       * pdp11.c (link_hash_table_create): Allocate table with
+       bfd_malloc, not bfd_alloc.
+       * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create): Allocate table
+       with bfd_zmalloc, not bfd_zalloc.
+       (bfin_link_hash_table_create): Likewise.
+       * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
+       * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
+
 2013-02-10  Alan Modra  <amodra@gmail.com>
 
        PR ld/15113
index c8e089b7f0aee298c6ce01be8d520d6e823918c9..a42d3a45dbe0f9c31c44de5898f41fdd190073cc 100644 (file)
@@ -1821,7 +1821,7 @@ bfinfdpic_elf_link_hash_table_create (bfd *abfd)
   struct bfinfdpic_elf_link_hash_table *ret;
   bfd_size_type amt = sizeof (struct bfinfdpic_elf_link_hash_table);
 
-  ret = bfd_zalloc (abfd, amt);
+  ret = bfd_zmalloc (amt);
   if (ret == NULL)
     return NULL;
 
@@ -5088,7 +5088,7 @@ bfin_link_hash_table_create (bfd * abfd)
   struct bfin_link_hash_table *ret;
   bfd_size_type amt = sizeof (struct bfin_link_hash_table);
 
-  ret = bfd_zalloc (abfd, amt);
+  ret = bfd_zmalloc (amt);
   if (ret == NULL)
     return NULL;
 
index 94e08555369bf9704726bcceb1e801763a49956d..0f35082c7a7a2c80094fa07ec5775ca077f662ab 100644 (file)
@@ -952,7 +952,7 @@ frvfdpic_elf_link_hash_table_create (bfd *abfd)
   struct frvfdpic_elf_link_hash_table *ret;
   bfd_size_type amt = sizeof (struct frvfdpic_elf_link_hash_table);
 
-  ret = bfd_zalloc (abfd, amt);
+  ret = bfd_zmalloc (amt);
   if (ret == NULL)
     return NULL;
 
index 7f1b9e20222bba84b2d21f0ca1cc1e4ec87345f1..0d5fa6e53d6a25bbea6a04a0536c91ba3f35e538 100644 (file)
@@ -299,7 +299,7 @@ elf64_hppa_hash_table_create (bfd *abfd)
   struct elf64_hppa_link_hash_table *htab;
   bfd_size_type amt = sizeof (*htab);
 
-  htab = bfd_zalloc (abfd, amt);
+  htab = bfd_zmalloc (amt);
   if (htab == NULL)
     return NULL;
 
@@ -308,7 +308,7 @@ elf64_hppa_hash_table_create (bfd *abfd)
                                      sizeof (struct elf64_hppa_link_hash_entry),
                                      HPPA64_ELF_DATA))
     {
-      bfd_release (abfd, htab);
+      free (htab);
       return NULL;
     }
 
index 33a680893d4548194a631f42a836f34fa584e7c4..65ae5c9c6df82c714192c0a2649a1040b5ef9e05 100644 (file)
@@ -204,7 +204,7 @@ linux_link_hash_table_create (bfd *abfd)
   struct linux_link_hash_table *ret;
   bfd_size_type amt = sizeof (struct linux_link_hash_table);
 
-  ret = (struct linux_link_hash_table *) bfd_alloc (abfd, amt);
+  ret = (struct linux_link_hash_table *) bfd_zmalloc (amt);
   if (ret == (struct linux_link_hash_table *) NULL)
     return (struct bfd_link_hash_table *) NULL;
   if (!NAME(aout,link_hash_table_init) (&ret->root, abfd,
@@ -215,11 +215,6 @@ linux_link_hash_table_create (bfd *abfd)
       return (struct bfd_link_hash_table *) NULL;
     }
 
-  ret->dynobj = NULL;
-  ret->fixup_count = 0;
-  ret->local_builtins = 0;
-  ret->fixup_list = NULL;
-
   return &ret->root.root;
 }
 
index 706beefe2a45674ef99b8d5f243a66565553e64a..1560f17762c55410027456fe97f1e2051a76ce04 100644 (file)
@@ -2459,7 +2459,7 @@ NAME (aout, link_hash_table_create) (bfd *abfd)
   struct aout_link_hash_table *ret;
   bfd_size_type amt = sizeof (struct aout_link_hash_table);
 
-  ret = bfd_alloc (abfd, amt);
+  ret = bfd_malloc (amt);
   if (ret == NULL)
     return NULL;
   if (! NAME (aout, link_hash_table_init) (ret, abfd,