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-bfd.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 'bfd/elf-bfd.h')
-rw-r--r-- | bfd/elf-bfd.h | 80 |
1 files changed, 45 insertions, 35 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 03fbd75..8a1b6da 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -104,40 +104,6 @@ struct elf_link_hash_entry not visible outside this DSO. */ long dynindx; - /* String table index in .dynstr if this is a dynamic symbol. */ - unsigned long dynstr_index; - - /* Hash value of the name computed using the ELF hash function. */ - unsigned long elf_hash_value; - - /* If this is a weak defined symbol from a dynamic object, this - field points to a defined symbol with the same value, if there is - one. Otherwise it is NULL. */ - struct elf_link_hash_entry *weakdef; - - /* Version information. */ - union - { - /* This field is used for a symbol which is not defined in a - regular object. It points to the version information read in - from the dynamic object. */ - Elf_Internal_Verdef *verdef; - /* This field is used for a symbol which is defined in a regular - object. It is set up in size_dynamic_sections. It points to - the version information we should write out for this symbol. */ - struct bfd_elf_version_tree *vertree; - } verinfo; - - /* Virtual table entry use information. This array is nominally of size - size/sizeof(target_void_pointer), though we have to be able to assume - and track a size while the symbol is still undefined. It is indexed - via offset/sizeof(target_void_pointer). */ - size_t vtable_entries_size; - bfd_boolean *vtable_entries_used; - - /* Virtual table derivation info. */ - struct elf_link_hash_entry *vtable_parent; - /* If this symbol requires an entry in the global offset table, the processor specific backend uses this field to track usage and final offset. Two schemes are supported: The first assumes that @@ -194,13 +160,57 @@ struct elf_link_hash_entry /* Symbol is referenced by a non-GOT/non-PLT relocation. This is not currently set by all the backends. */ unsigned int non_got_ref : 1; - /* Symbol has a definition in a shared object. */ + /* Symbol has a definition in a shared object. + FIXME: There is no real need for this field if def_dynamic is never + cleared and all places that test def_dynamic also test def_regular. */ unsigned int dynamic_def : 1; /* Symbol is weak in all shared objects. */ unsigned int dynamic_weak : 1; /* Symbol is referenced with a relocation where C/C++ pointer equality matters. */ unsigned int pointer_equality_needed : 1; + + /* String table index in .dynstr if this is a dynamic symbol. */ + unsigned long dynstr_index; + + union + { + /* If this is a weak defined symbol from a dynamic object, this + field points to a defined symbol with the same value, if there is + one. Otherwise it is NULL. */ + struct elf_link_hash_entry *weakdef; + + /* Hash value of the name computed using the ELF hash function. + Used part way through size_dynamic_sections, after we've finished + with weakdefs. */ + unsigned long elf_hash_value; + } u; + + /* Version information. */ + union + { + /* This field is used for a symbol which is not defined in a + regular object. It points to the version information read in + from the dynamic object. */ + Elf_Internal_Verdef *verdef; + /* This field is used for a symbol which is defined in a regular + object. It is set up in size_dynamic_sections. It points to + the version information we should write out for this symbol. */ + struct bfd_elf_version_tree *vertree; + } verinfo; + + struct + { + /* Virtual table entry use information. This array is nominally of size + size/sizeof(target_void_pointer), though we have to be able to assume + and track a size while the symbol is still undefined. It is indexed + via offset/sizeof(target_void_pointer). */ + size_t size; + bfd_boolean *used; + + /* Virtual table derivation info. */ + struct elf_link_hash_entry *parent; + } *vtable; }; /* Will references to this symbol always reference the symbol |