aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-11-02 15:45:12 +1030
committerAlan Modra <amodra@gmail.com>2013-11-02 15:45:12 +1030
commitcacce40b2df7955f7ba7191c61099e0b7867d416 (patch)
tree53021779a160f89a3c807b22cce153e7b0d796df /bfd
parentc7c3f80e9ccc436c6061f1c85b7ca9450fa5d3aa (diff)
downloadgdb-cacce40b2df7955f7ba7191c61099e0b7867d416.zip
gdb-cacce40b2df7955f7ba7191c61099e0b7867d416.tar.gz
gdb-cacce40b2df7955f7ba7191c61099e0b7867d416.tar.bz2
Remove unnecessary _bfd_new_bfd initialisation
nbfd is allocated by bfd_zmalloc. * opncls.c (_bfd_new_bfd): Don't init vars already zeroed.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/opncls.c15
2 files changed, 4 insertions, 15 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 727b0bd..8c386aa 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,9 @@
2013-11-02 Alan Modra <amodra@gmail.com>
+ * opncls.c (_bfd_new_bfd): Don't init vars already zeroed.
+
+2013-11-02 Alan Modra <amodra@gmail.com>
+
* elf64-ppc.c (ppc64_elf_next_input_section): Always set toc_off
to value for object file.
diff --git a/bfd/opncls.c b/bfd/opncls.c
index 2147dee..3f09420 100644
--- a/bfd/opncls.c
+++ b/bfd/opncls.c
@@ -80,27 +80,12 @@ _bfd_new_bfd (void)
nbfd->arch_info = &bfd_default_arch_struct;
- nbfd->direction = no_direction;
- nbfd->iostream = NULL;
- nbfd->where = 0;
if (!bfd_hash_table_init_n (& nbfd->section_htab, bfd_section_hash_newfunc,
sizeof (struct section_hash_entry), 13))
{
free (nbfd);
return NULL;
}
- nbfd->sections = NULL;
- nbfd->section_last = NULL;
- nbfd->format = bfd_unknown;
- nbfd->my_archive = NULL;
- nbfd->origin = 0;
- nbfd->opened_once = FALSE;
- nbfd->output_has_begun = FALSE;
- nbfd->section_count = 0;
- nbfd->usrdata = NULL;
- nbfd->cacheable = FALSE;
- nbfd->flags = BFD_NO_FLAGS;
- nbfd->mtime_set = FALSE;
return nbfd;
}