mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 09:38:57 +00:00
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.
This commit is contained in:
26
bfd/linker.c
26
bfd/linker.c
@@ -455,7 +455,7 @@ _bfd_link_hash_newfunc (struct bfd_hash_entry *entry,
|
||||
|
||||
/* Initialize the local fields. */
|
||||
h->type = bfd_link_hash_new;
|
||||
h->und_next = NULL;
|
||||
h->u.undef.next = NULL;
|
||||
}
|
||||
|
||||
return entry;
|
||||
@@ -616,9 +616,9 @@ void
|
||||
bfd_link_add_undef (struct bfd_link_hash_table *table,
|
||||
struct bfd_link_hash_entry *h)
|
||||
{
|
||||
BFD_ASSERT (h->und_next == NULL);
|
||||
BFD_ASSERT (h->u.undef.next == NULL);
|
||||
if (table->undefs_tail != NULL)
|
||||
table->undefs_tail->und_next = h;
|
||||
table->undefs_tail->u.undef.next = h;
|
||||
if (table->undefs == NULL)
|
||||
table->undefs = h;
|
||||
table->undefs_tail = h;
|
||||
@@ -990,9 +990,9 @@ _bfd_generic_link_add_archive_symbols
|
||||
us to lose track of whether the symbol has been
|
||||
referenced). */
|
||||
if (*pundef != info->hash->undefs_tail)
|
||||
*pundef = (*pundef)->und_next;
|
||||
*pundef = (*pundef)->u.undef.next;
|
||||
else
|
||||
pundef = &(*pundef)->und_next;
|
||||
pundef = &(*pundef)->u.undef.next;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1015,7 +1015,7 @@ _bfd_generic_link_add_archive_symbols
|
||||
}
|
||||
if (arh == NULL)
|
||||
{
|
||||
pundef = &(*pundef)->und_next;
|
||||
pundef = &(*pundef)->u.undef.next;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -1064,7 +1064,7 @@ _bfd_generic_link_add_archive_symbols
|
||||
}
|
||||
}
|
||||
|
||||
pundef = &(*pundef)->und_next;
|
||||
pundef = &(*pundef)->u.undef.next;
|
||||
}
|
||||
|
||||
archive_hash_table_free (&arsym_hash);
|
||||
@@ -1694,8 +1694,8 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
|
||||
|
||||
case REF:
|
||||
/* A reference to a defined symbol. */
|
||||
if (h->und_next == NULL && info->hash->undefs_tail != h)
|
||||
h->und_next = h;
|
||||
if (h->u.undef.next == NULL && info->hash->undefs_tail != h)
|
||||
h->u.undef.next = h;
|
||||
break;
|
||||
|
||||
case BIG:
|
||||
@@ -1881,8 +1881,8 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
|
||||
|
||||
case REFC:
|
||||
/* A reference to an indirect symbol. */
|
||||
if (h->und_next == NULL && info->hash->undefs_tail != h)
|
||||
h->und_next = h;
|
||||
if (h->u.undef.next == NULL && info->hash->undefs_tail != h)
|
||||
h->u.undef.next = h;
|
||||
h = h->u.i.link;
|
||||
cycle = TRUE;
|
||||
break;
|
||||
@@ -1897,10 +1897,10 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
|
||||
case CWARN:
|
||||
/* Warn if this symbol has been referenced already,
|
||||
otherwise add a warning. A symbol has been referenced if
|
||||
the und_next field is not NULL, or it is the tail of the
|
||||
the u.undef.next field is not NULL, or it is the tail of the
|
||||
undefined symbol list. The REF case above helps to
|
||||
ensure this. */
|
||||
if (h->und_next != NULL || info->hash->undefs_tail == h)
|
||||
if (h->u.undef.next != NULL || info->hash->undefs_tail == h)
|
||||
{
|
||||
if (! (*info->callbacks->warning) (info, string, h->root.string,
|
||||
hash_entry_bfd (h), NULL, 0))
|
||||
|
||||
Reference in New Issue
Block a user