aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2004-09-16 14:52:12 +0000
committerAlan Modra <amodra@gmail.com>2004-09-16 14:52:12 +0000
commitf5385ebfb8e4e9e336adba121a22d110488303d1 (patch)
tree9e0255b2253d334ed022b14e44bf44c23f909e22 /bfd/elf.c
parentb6ee372a3e4a3c008d6576e6b5ab51f1cf01bed4 (diff)
downloadfsf-binutils-gdb-f5385ebfb8e4e9e336adba121a22d110488303d1.zip
fsf-binutils-gdb-f5385ebfb8e4e9e336adba121a22d110488303d1.tar.gz
fsf-binutils-gdb-f5385ebfb8e4e9e336adba121a22d110488303d1.tar.bz2
* elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
with bitfields. Make "type" and "other" bitfields too. (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR, ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC, ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED, ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF, ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK, ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK, ELF_LINK_POINTER_EQUALITY_NEEDED): Delete. (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update. * elf-hppa.h: Update all uses of elf_link_hash_flags. * elf-m10300.c: Likewise. * elf.c: Likewise. * 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-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.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. * elflink.c: Likewise. * elfxx-ia64.c: Likewise. * elfxx-mips.c: Likewise. * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92. * configure: Regenerate. * aclocal.m4: Regenerate.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c34
1 files changed, 24 insertions, 10 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index c0d6009..3c34ed4 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1407,7 +1407,22 @@ _bfd_elf_link_hash_newfunc (struct bfd_hash_entry *entry,
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->elf_link_hash_flags = ELF_LINK_NON_ELF;
+ 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;
@@ -1427,13 +1442,12 @@ _bfd_elf_link_hash_copy_indirect (const struct elf_backend_data *bed,
/* Copy down any references that we may have already seen to the
symbol which just became indirect. */
- dir->elf_link_hash_flags
- |= ind->elf_link_hash_flags & (ELF_LINK_HASH_REF_DYNAMIC
- | ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_REF_REGULAR_NONWEAK
- | ELF_LINK_NON_GOT_REF
- | ELF_LINK_HASH_NEEDS_PLT
- | ELF_LINK_POINTER_EQUALITY_NEEDED);
+ dir->ref_dynamic |= ind->ref_dynamic;
+ dir->ref_regular |= ind->ref_regular;
+ dir->ref_regular_nonweak |= ind->ref_regular_nonweak;
+ dir->non_got_ref |= ind->non_got_ref;
+ dir->needs_plt |= ind->needs_plt;
+ dir->pointer_equality_needed |= ind->pointer_equality_needed;
if (ind->root.type != bfd_link_hash_indirect)
return;
@@ -1475,10 +1489,10 @@ _bfd_elf_link_hash_hide_symbol (struct bfd_link_info *info,
bfd_boolean force_local)
{
h->plt = elf_hash_table (info)->init_offset;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ h->needs_plt = 0;
if (force_local)
{
- h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
+ h->forced_local = 1;
if (h->dynindx != -1)
{
h->dynindx = -1;