From 3254fd24bd81018442d7023d81197cacd6fb3eac Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 19 Jun 2003 15:11:26 +0000 Subject: [PATCH] * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of elf hash tab fields. --- bfd/ChangeLog | 3 +++ bfd/elf64-ppc.c | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 28284ecd2dc..0da3e43e910 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,8 @@ 2003-06-19 Alan Modra + * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of + elf hash tab fields. + * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype. (ppc64_elf_info_to_howto): Likewise. (ppc64_elf_build_stubs): Add "stats" param, and print statistics. diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 6414d139521..1504c1db43a 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -3054,6 +3054,15 @@ ppc64_elf_link_hash_table_create (abfd) if (!bfd_hash_table_init (&htab->branch_hash_table, branch_hash_newfunc)) return NULL; + /* Initializing two fields of the union is just cosmetic. We really + only care about glist, but when compiled on a 32-bit host the + bfd_vma fields are larger. Setting the bfd_vma to zero makes + debugger inspection of these fields look nicer. */ + htab->elf.init_refcount.refcount = 0; + htab->elf.init_refcount.glist = NULL; + htab->elf.init_offset.offset = 0; + htab->elf.init_offset.glist = NULL; + return &htab->elf.root; } -- 2.30.2