diff options
author | Alan Modra <amodra@bigpond.net.au> | 2004-09-17 07:14:32 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2004-09-17 07:14:32 +0000 |
commit | 1977c21e788983f505594bd9c6cb67c422e6a444 (patch) | |
tree | dd49e676390baa7150a9f5af86a9912637ef3759 /include | |
parent | 019430e5091d0f58852bd3a68e8b4a883e4767a4 (diff) | |
download | gdb-1977c21e788983f505594bd9c6cb67c422e6a444.tar.gz |
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 'include')
-rw-r--r-- | include/ChangeLog | 5 | ||||
-rw-r--r-- | include/bfdlink.h | 47 |
2 files changed, 30 insertions, 22 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index fa03f7cd7fa..a1d374e150c 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -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__. diff --git a/include/bfdlink.h b/include/bfdlink.h index 5adad790e6f..5aa72d4b4c2 100644 --- a/include/bfdlink.h +++ b/include/bfdlink.h @@ -85,26 +85,6 @@ struct bfd_link_hash_entry /* Type of this entry. */ enum bfd_link_hash_type type; - /* 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 - 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 - doublecheck the symbol type. - - Weak symbols are not kept on this list. - - Defined and defweak symbols use this field as a reference marker. - If the field is not NULL, or this structure is the tail of the - undefined symbol list, the symbol has been referenced. If the - 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 { @@ -112,23 +92,46 @@ struct bfd_link_hash_entry /* 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 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 + doublecheck the symbol type. + + Weak symbols are not kept on this list. + + Defined and defweak symbols use this field as a reference marker. + If the field is not NULL, or this structure is the tail of the + undefined symbol list, the symbol has been referenced. If the + 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 *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; }; |