* elflink.c (elf_link_add_object_symbols): Save and restore
authorAlan Modra <amodra@gmail.com>
Tue, 13 Jun 2006 14:49:54 +0000 (14:49 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 13 Jun 2006 14:49:54 +0000 (14:49 +0000)
struct bfd_hash_table table, size and count fields for
as-needed libs.

bfd/ChangeLog
bfd/elflink.c

index 8a369c8b38f6a5dd785509b7bd977c20a00a89ee..5090a01bdb200353fa023bafdf426304ea1b185f 100644 (file)
@@ -1,3 +1,9 @@
+2006-06-14  Alan Modra  <amodra@bigpond.net.au>
+
+       * elflink.c (elf_link_add_object_symbols): Save and restore
+       struct bfd_hash_table table, size and count fields for
+       as-needed libs.
+
 2006-06-12  Thiemo Seufer  <ths@mips.com>
 
        * elf32-mips.c: Expand comment about ABI-mandated pagesize values.
index f4c63f4366bacc32f39b7965f3d68a11fd87d69c..0a329633689cf96dfd6c70511f9e16f6f10345f9 100644 (file)
@@ -3080,6 +3080,9 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
   struct elf_link_hash_table *htab;
   bfd_size_type amt;
   void *alloc_mark = NULL;
+  struct bfd_hash_entry **old_table = NULL;
+  unsigned int old_size = 0;
+  unsigned int old_count = 0;
   void *old_tab = NULL;
   void *old_hash;
   void *old_ent;
@@ -3504,6 +3507,9 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
       memcpy (old_hash, sym_hash, hashsize);
       old_undefs = htab->root.undefs;
       old_undefs_tail = htab->root.undefs_tail;
+      old_table = htab->root.table.table;
+      old_size = htab->root.table.size;
+      old_count = htab->root.table.count;
       old_dynsymcount = htab->dynsymcount;
 
       for (i = 0; i < htab->root.table.size; i++)
@@ -4151,6 +4157,9 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
       old_hash = (char *) old_tab + tabsize;
       old_ent = (char *) old_hash + hashsize;
       sym_hash = elf_sym_hashes (abfd);
+      htab->root.table.table = old_table;
+      htab->root.table.size = old_size;
+      htab->root.table.count = old_count;
       memcpy (htab->root.table.table, old_tab, tabsize);
       memcpy (sym_hash, old_hash, hashsize);
       htab->root.undefs = old_undefs;