aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2007-02-01 09:03:25 +0000
committerNick Clifton <nickc@redhat.com>2007-02-01 09:03:25 +0000
commiteffdf42a7b31e55a7dc98137519cfacfbf400533 (patch)
tree29a2fffe254a05de5f784d755a1111f84848298f
parent183e98bed26941bb85b3170a4620ac32b1f8f686 (diff)
downloadfsf-binutils-gdb-effdf42a7b31e55a7dc98137519cfacfbf400533.zip
fsf-binutils-gdb-effdf42a7b31e55a7dc98137519cfacfbf400533.tar.gz
fsf-binutils-gdb-effdf42a7b31e55a7dc98137519cfacfbf400533.tar.bz2
PR ld/3852
* elf.c (_bfd_elf_link_hash_table_init): Initialize all the fields in the elf_link_hash_table structure.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf.c17
2 files changed, 7 insertions, 16 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 9a76b7b..e919ff3 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2007-02-01 Nick Clifton <nickc@redhat.com>
+
+ PR ld/3852
+ * elf.c (_bfd_elf_link_hash_table_init): Initialize all the fields
+ in the elf_link_hash_table structure.
+
2007-02-01 Alan Modra <amodra@bigpond.net.au>
* elf-bfd.h (struct elf_backend_data): Add elf_backend_write_core_note.
diff --git a/bfd/elf.c b/bfd/elf.c
index 66aa1c7..c5c8c61 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1592,28 +1592,13 @@ _bfd_elf_link_hash_table_init
bfd_boolean ret;
int can_refcount = get_elf_backend_data (abfd)->can_refcount;
- table->dynamic_sections_created = FALSE;
- table->dynobj = NULL;
+ memset (table, 0, sizeof * table);
table->init_got_refcount.refcount = can_refcount - 1;
table->init_plt_refcount.refcount = can_refcount - 1;
table->init_got_offset.offset = -(bfd_vma) 1;
table->init_plt_offset.offset = -(bfd_vma) 1;
/* The first dynamic symbol is a dummy. */
table->dynsymcount = 1;
- table->dynstr = NULL;
- table->bucketcount = 0;
- table->needed = NULL;
- table->hgot = NULL;
- table->hplt = NULL;
- table->merge_info = NULL;
- memset (&table->stab_info, 0, sizeof (table->stab_info));
- memset (&table->eh_info, 0, sizeof (table->eh_info));
- table->dynlocal = NULL;
- table->runpath = NULL;
- table->tls_sec = NULL;
- table->tls_size = 0;
- table->loaded = NULL;
- table->is_relocatable_executable = FALSE;
ret = _bfd_link_hash_table_init (&table->root, abfd, newfunc, entsize);
table->root.type = bfd_link_elf_hash_table;