From: Alan Modra <amodra@bigpond.net.au>
To: binutils@sourceware.org, Andreas Schwab <schwab@suse.de>
Subject: Re: Increment
Date: Tue, 13 Jun 2006 14:52:00 -0000 [thread overview]
Message-ID: <20060613144906.GK32562@bubble.grove.modra.org> (raw)
In-Reply-To: <20060613143812.GJ32562@bubble.grove.modra.org>
On Wed, Jun 14, 2006 at 12:08:12AM +0930, Alan Modra wrote:
> On Tue, Jun 13, 2006 at 12:52:09PM +0200, Andreas Schwab wrote:
> > <ftp://ftp.suse.com/pub/people/schwab/hash-resize-test.tar.gz>
>
> The sym table is being resized while an as-needed lib is being loaded.
> Some extra hash table state needs to be restored, table, size and
> count.
* elflink.c (elf_link_add_object_symbols): Save and restore
struct bfd_hash_table table, size and count fields for
as-needed libs.
Index: bfd/elflink.c
===================================================================
RCS file: /cvs/src/src/bfd/elflink.c,v
retrieving revision 1.218
diff -u -p -r1.218 elflink.c
--- bfd/elflink.c 12 Jun 2006 11:12:51 -0000 1.218
+++ bfd/elflink.c 13 Jun 2006 14:43:41 -0000
@@ -3080,6 +3080,9 @@ elf_link_add_object_symbols (bfd *abfd,
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,
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,
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;
--
Alan Modra
IBM OzLabs - Linux Technology Centre
prev parent reply other threads:[~2006-06-13 14:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-27 16:33 Increment Ian Lance Taylor
2006-06-06 4:30 ` Increment Alan Modra
2006-06-06 10:52 ` Increment Alan Modra
2006-06-07 1:40 ` Increment Thiemo Seufer
2006-06-07 5:02 ` Increment Alan Modra
2006-06-09 13:42 ` Increment Andreas Schwab
2006-06-12 4:32 ` Increment Alan Modra
2006-06-12 10:50 ` Increment Andreas Schwab
2006-06-12 18:53 ` Increment DJ Delorie
2006-06-12 19:13 ` Increment H. J. Lu
2006-06-12 23:55 ` Increment Andreas Schwab
2006-06-13 1:11 ` Increment Alan Modra
2006-06-13 10:52 ` Increment Andreas Schwab
2006-06-13 8:53 ` Increment H. J. Lu
2006-06-13 13:49 ` Increment Andreas Schwab
2006-06-13 14:49 ` Increment Alan Modra
2006-06-13 14:52 ` Alan Modra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060613144906.GK32562@bubble.grove.modra.org \
--to=amodra@bigpond.net.au \
--cc=binutils@sourceware.org \
--cc=schwab@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).