diff options
author | Alan Modra <amodra@gmail.com> | 2004-09-17 07:14:33 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2004-09-17 07:14:33 +0000 |
commit | f6e332e6604aa0bbc05b745d677222e25da2133e (patch) | |
tree | 2dfe6d973e47591b58ab9b7b6f5cd90f65c3a8dd /bfd/elf.c | |
parent | bafcb7227e1b188d4fb9ebdc2948127eeda86704 (diff) | |
download | gdb-f6e332e6604aa0bbc05b745d677222e25da2133e.zip gdb-f6e332e6604aa0bbc05b745d677222e25da2133e.tar.gz gdb-f6e332e6604aa0bbc05b745d677222e25da2133e.tar.bz2 |
include/
* bfdlink.h (struct bfd_link_hash_entry): Move und_next into elements
of union.
bfd/
* ecoff.c: Update u.undef.next refs.
* elf64-ppc.c: Likewise.
* elflink.c: Likewise.
* linker.c: Likewise.
* xcofflink.c: Likewise.
ld/
* ldexp.c (fold_name): Update u.undef.next refs.
* emultempl/pe.em: Likewise.
* emultempl/sunos.em: Likewise.
bfd/
* elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
dynamic_def. Combine weakdef and elf_hash_value. Move vtable
fields to indirect struct.
* elf-m10300.c: Update u.weakdef refs.
* elf32-arm.h: Likewise.
* elf32-cris.c: Likewise.
* elf32-frv.c: Likewise.
* elf32-hppa.c: Likewise.
* elf32-i370.c: Likewise.
* elf32-i386.c: Likewise.
* elf32-m32r.c: Likewise.
* elf32-m68k.c: Likewise.
* elf32-ppc.c: Likewise.
* elf32-s390.c: Likewise.
* elf32-sh.c: Likewise.
* elf32-sparc.c: Likewise.
* elf32-vax.c: Likewise.
* elf32-xtensa.c: Likewise.
* elf64-alpha.c: Likewise.
* elf64-hppa.c: Likewise.
* elf64-ppc.c: Likewise.
* elf64-s390.c: Likewise.
* elf64-sh64.c: Likewise.
* elf64-sparc.c: Likewise.
* elf64-x86-64.c: Likewise.
* elfxx-ia64.c: Likewise.
* elfxx-mips.c: Likewise.
* elflink.c: Likewise. Also u.elf_hash_value.
(elf_gc_propagate_vtable_entries_used): Update for h->vtable
indirection.
(elf_gc_smash_unused_vtentry_relocs): Likewise.
(bfd_elf_gc_record_vtinherit): Alloc vtable.
(bfd_elf_gc_record_vtentry): Likewise.
* elf.c (_bfd_elf_link_hash_newfunc): Use memset.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 30 |
1 files changed, 3 insertions, 27 deletions
@@ -1391,38 +1391,14 @@ _bfd_elf_link_hash_newfunc (struct bfd_hash_entry *entry, /* Set local fields. */ ret->indx = -1; ret->dynindx = -1; - ret->dynstr_index = 0; - ret->elf_hash_value = 0; - ret->weakdef = NULL; - ret->verinfo.verdef = NULL; - ret->vtable_entries_size = 0; - ret->vtable_entries_used = NULL; - ret->vtable_parent = NULL; - ret->got = htab->init_refcount; - ret->plt = htab->init_refcount; - ret->size = 0; - ret->type = STT_NOTYPE; - ret->other = 0; + ret->got = ret->plt = htab->init_refcount; + memset (&ret->size, 0, (sizeof (struct elf_link_hash_entry) + - offsetof (struct elf_link_hash_entry, size))); /* Assume that we have been called by a non-ELF symbol reader. This flag is then reset by the code which reads an ELF input file. This ensures that a symbol created by a non-ELF symbol reader will have the flag set correctly. */ - ret->ref_regular = 0; - ret->def_regular = 0; - ret->ref_dynamic = 0; - ret->def_dynamic = 0; - ret->ref_regular_nonweak = 0; - ret->dynamic_adjusted = 0; - ret->needs_copy = 0; - ret->needs_plt = 0; ret->non_elf = 1; - ret->hidden = 0; - ret->forced_local = 0; - ret->mark = 0; - ret->non_got_ref = 0; - ret->dynamic_def = 0; - ret->dynamic_weak = 0; - ret->pointer_equality_needed = 0; } return entry; |