* 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.
This commit is contained in:
Alan Modra 2004-09-17 07:14:32 +00:00
parent ed6859b8f0
commit ade297155c
2 changed files with 30 additions and 22 deletions

View File

@ -1,3 +1,8 @@
2004-09-17 Alan Modra <amodra@bigpond.net.au>
* bfdlink.h (struct bfd_link_hash_entry): Move und_next into elements
of union.
2004-09-13 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
* libiberty.h (basename): Prototype for __MINGW32__.

View File

@ -85,11 +85,19 @@ struct bfd_link_hash_entry
/* Type of this entry. */
enum bfd_link_hash_type type;
/* A union of information depending upon the type. */
union
{
/* Nothing is kept for bfd_hash_new. */
/* bfd_link_hash_undefined, bfd_link_hash_undefweak. */
struct
{
/* Undefined and common symbols are kept in a linked list through
this field. This field is not in the union because that would
force us to remove entries from the list when we changed their
type, which would force the list to be doubly linked, which would
waste more memory. When an undefined or common symbol is
this field. This field is present in all of the union element
so that we don't need to remove entries from the list when we
change their type. Removing entries would either require the
list to be doubly linked, which would waste more memory, or
require a traversal. When an undefined or common symbol is
created, it should be added to this list, the head of which is in
the link hash table itself. As symbols are defined, they need
not be removed from the list; anything which reads the list must
@ -103,32 +111,27 @@ struct bfd_link_hash_entry
symbol is undefined and becomes defined, this field will
automatically be non-NULL since the symbol will have been on the
undefined symbol list. */
struct bfd_link_hash_entry *und_next;
/* A union of information depending upon the type. */
union
{
/* Nothing is kept for bfd_hash_new. */
/* bfd_link_hash_undefined, bfd_link_hash_undefweak. */
struct
{
struct bfd_link_hash_entry *next;
bfd *abfd; /* BFD symbol was found in. */
} undef;
/* bfd_link_hash_defined, bfd_link_hash_defweak. */
struct
{
bfd_vma value; /* Symbol value. */
struct bfd_link_hash_entry *next;
asection *section; /* Symbol section. */
bfd_vma value; /* Symbol value. */
} def;
/* bfd_link_hash_indirect, bfd_link_hash_warning. */
struct
{
struct bfd_link_hash_entry *next;
struct bfd_link_hash_entry *link; /* Real symbol. */
const char *warning; /* Warning (bfd_link_hash_warning only). */
} i;
/* bfd_link_hash_common. */
struct
{
struct bfd_link_hash_entry *next;
/* The linker needs to know three things about common
symbols: the size, the alignment, and the section in
which the symbol should be placed. We store the size
@ -138,12 +141,12 @@ struct bfd_link_hash_entry
directly because we don't want to increase the size of
the union; this structure is a major space user in the
linker. */
bfd_size_type size; /* Common symbol size. */
struct bfd_link_hash_common_entry
{
unsigned int alignment_power; /* Alignment. */
asection *section; /* Symbol section. */
} *p;
bfd_size_type size; /* Common symbol size. */
} c;
} u;
};