This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.10-190-g077e770
- From: drepper at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 23 Jul 2009 14:37:29 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.10-190-g077e770
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 077e7700b30df967d9000ebe692894fc5d66df80 (commit)
from 802fe9a1ca0577e8eac28c31a8c20497b15e7e69 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=077e7700b30df967d9000ebe692894fc5d66df80
commit 077e7700b30df967d9000ebe692894fc5d66df80
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jul 23 07:36:34 2009 -0700
Some more fixes for the unique symbol handling.
The hash value can be zero, so we need a different test for empty
slots. And unify the way we prevent a DSO from being unloaded.
diff --git a/ChangeLog b/ChangeLog
index bea7ba0..5dc5d41 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2009-07-23 Ulrich Drepper <drepper@redhat.com>
+ * elf/dl-lookup.c (dl_lookup_x): The hashval for unique symbol can
+ potentially be zero.
+
* elf/tst-unique1.c: Extend test to check for unloading DSO with
unique symbol definition.
Patch by Jakub Jelinek.
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index bdc84af..1333123 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -318,7 +318,7 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
size_t hash2 = 1 + hash % (size - 2);
while (1)
{
- if (table[idx].hashval == 0)
+ if (table[idx].name == NULL)
{
table[idx].hashval = hash;
table[idx].name = strtab + sym->st_name;
@@ -336,7 +336,7 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
if (table[idx].map->l_type == lt_loaded)
/* Make sure we don't unload this object by
artificially increason the open count. */
- ++table[idx].map->l_direct_opencount;
+ table[idx].map->l_flags_1 |= DF_1_NODELETE;
return;
}
@@ -369,8 +369,7 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
return 1;
}
- if (entries[idx].hashval == 0
- && entries[idx].name == NULL)
+ if (entries[idx].name == NULL)
break;
idx += hash2;
@@ -392,7 +391,7 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
}
for (idx = 0; idx < size; ++idx)
- if (entries[idx].hashval != 0)
+ if (entries[idx].name != NULL)
enter (newentries, newsize, entries[idx].hashval,
entries[idx].name, entries[idx].sym,
entries[idx].map);
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 3 +++
elf/dl-lookup.c | 9 ++++-----
2 files changed, 7 insertions(+), 5 deletions(-)
hooks/post-receive
--
GNU C Library master sources