summaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2002-11-26 11:54:02 +0000
committerAlan Modra <amodra@bigpond.net.au>2002-11-26 11:54:02 +0000
commit1244880e73d78767506ccc8bfd9a3487d4a95419 (patch)
tree2c7aaee49cd0ac190f9532662c132282fc44f887 /bfd/elf.c
parent6c269ae5791aa38453815dc87da31b3dbf684514 (diff)
downloadbinutils-redhat-1244880e73d78767506ccc8bfd9a3487d4a95419.tar.gz
* elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
(_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs on a relocatable link. Comment typos. * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure in the order they are declared. Clear elf_hash_value too. (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear eh_info and tls_segment. * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets sorted when discarding relocs by turning them into R_*_NONE. * libbfd.c (warn_deprecated): Comment spelling. * po/SRC-POTFILES.in: Regenerate.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 4ddc99dee0..46c2c9ecab 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1391,17 +1391,18 @@ _bfd_elf_link_hash_newfunc (entry, table, string)
/* Set local fields. */
ret->indx = -1;
- ret->size = 0;
ret->dynindx = -1;
ret->dynstr_index = 0;
+ ret->elf_hash_value = 0;
ret->weakdef = NULL;
- ret->got.refcount = htab->init_refcount;
- ret->plt.refcount = htab->init_refcount;
ret->linker_section_pointer = NULL;
ret->verinfo.verdef = NULL;
- ret->vtable_entries_used = NULL;
ret->vtable_entries_size = 0;
+ ret->vtable_entries_used = NULL;
ret->vtable_parent = NULL;
+ ret->got.refcount = htab->init_refcount;
+ ret->plt.refcount = htab->init_refcount;
+ ret->size = 0;
ret->type = STT_NOTYPE;
ret->other = 0;
/* Assume that we have been called by a non-ELF symbol reader.
@@ -1512,13 +1513,16 @@ _bfd_elf_link_hash_table_init (table, abfd, newfunc)
table->dynstr = NULL;
table->bucketcount = 0;
table->needed = NULL;
- table->runpath = NULL;
- table->loaded = NULL;
table->hgot = NULL;
table->stab_info = NULL;
table->merge_info = NULL;
+ memset (&table->eh_info, 0, sizeof (table->eh_info));
table->dynlocal = NULL;
- ret = _bfd_link_hash_table_init (& table->root, abfd, newfunc);
+ table->runpath = NULL;
+ table->tls_segment = NULL;
+ table->loaded = NULL;
+
+ ret = _bfd_link_hash_table_init (&table->root, abfd, newfunc);
table->root.type = bfd_link_elf_hash_table;
return ret;