aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-02-10 04:01:15 +0000
committerAlan Modra <amodra@gmail.com>2013-02-10 04:01:15 +0000
commit22cdc249cd8dd8a43a5a4d2cba2b69f240362a8b (patch)
tree2532f5f4a13fb7f0e699b45bf644dabc8a2f2cc0 /bfd
parent0e5de31a6cfc218ea24a2c750921f7411c4e5c01 (diff)
downloadfsf-binutils-gdb-22cdc249cd8dd8a43a5a4d2cba2b69f240362a8b.zip
fsf-binutils-gdb-22cdc249cd8dd8a43a5a4d2cba2b69f240362a8b.tar.gz
fsf-binutils-gdb-22cdc249cd8dd8a43a5a4d2cba2b69f240362a8b.tar.bz2
* 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.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog12
-rw-r--r--bfd/elf32-bfin.c4
-rw-r--r--bfd/elf32-frv.c2
-rw-r--r--bfd/elf64-hppa.c4
-rw-r--r--bfd/i386linux.c7
-rw-r--r--bfd/pdp11.c2
6 files changed, 19 insertions, 12 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index cd86047..4342fa4 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,17 @@
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
* elf32-sh.c (sh_elf_link_hash_table_create): Use bfd_zmalloc.
diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
index c8e089b..a42d3a4 100644
--- a/bfd/elf32-bfin.c
+++ b/bfd/elf32-bfin.c
@@ -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;
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c
index 94e0855..0f35082 100644
--- a/bfd/elf32-frv.c
+++ b/bfd/elf32-frv.c
@@ -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;
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index 7f1b9e2..0d5fa6e 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -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;
}
diff --git a/bfd/i386linux.c b/bfd/i386linux.c
index 33a6808..65ae5c9 100644
--- a/bfd/i386linux.c
+++ b/bfd/i386linux.c
@@ -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;
}
diff --git a/bfd/pdp11.c b/bfd/pdp11.c
index 706beef..1560f17 100644
--- a/bfd/pdp11.c
+++ b/bfd/pdp11.c
@@ -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,