From: Alan Modra Date: Sun, 10 Feb 2013 02:30:21 +0000 (+0000) Subject: PR ld/15113 X-Git-Tag: binutils-2_23_2~61 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8b4e9f6bf54af5a97ece571949a80f8444920c04;p=thirdparty%2Fbinutils-gdb.git PR ld/15113 * elf32-sh.c (sh_elf_link_hash_table_create): Use bfd_zmalloc. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 09869651f88..a3f621c93c3 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2013-02-10 Alan Modra + + PR ld/15113 + * elf32-sh.c (sh_elf_link_hash_table_create): Use bfd_zmalloc. + 2013-02-08 Alan Modra PR binutils/15106 diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index cbd00aa6404..840b488144f 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -2549,7 +2549,7 @@ sh_elf_link_hash_table_create (bfd *abfd) struct elf_sh_link_hash_table *ret; bfd_size_type amt = sizeof (struct elf_sh_link_hash_table); - ret = (struct elf_sh_link_hash_table *) bfd_malloc (amt); + ret = (struct elf_sh_link_hash_table *) bfd_zmalloc (amt); if (ret == (struct elf_sh_link_hash_table *) NULL) return NULL; @@ -2562,17 +2562,6 @@ sh_elf_link_hash_table_create (bfd *abfd) return NULL; } - ret->sgot = NULL; - ret->sgotplt = NULL; - ret->srelgot = NULL; - ret->splt = NULL; - ret->srelplt = NULL; - ret->sdynbss = NULL; - ret->srelbss = NULL; - ret->srelplt2 = NULL; - ret->sym_cache.abfd = NULL; - ret->tls_ldm_got.refcount = 0; - ret->plt_info = NULL; ret->vxworks_p = vxworks_object_p (abfd); ret->fdpic_p = fdpic_object_p (abfd);