aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-11-26 11:54:02 +0000
committerAlan Modra <amodra@gmail.com>2002-11-26 11:54:02 +0000
commit73722af036f2e6d2f6f8fa129dd627d99511ce37 (patch)
tree4d2d46fc88acacb8e558936e8d1e6a16342d8706 /bfd/elf.c
parentfb2fd3e12c28c6faf4d048591793b9c1a5be1619 (diff)
downloadfsf-binutils-gdb-73722af036f2e6d2f6f8fa129dd627d99511ce37.zip
fsf-binutils-gdb-73722af036f2e6d2f6f8fa129dd627d99511ce37.tar.gz
fsf-binutils-gdb-73722af036f2e6d2f6f8fa129dd627d99511ce37.tar.bz2
* 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 4ddc99d..46c2c9e 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;