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 /include/bfdlink.h | |
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 'include/bfdlink.h')
-rw-r--r-- | include/bfdlink.h | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/include/bfdlink.h b/include/bfdlink.h index 5adad79..5aa72d4 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; }; |