This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
Community source repository for glibc add-on ports branch, master, updated. glibc-2.11-16-g84f9266
- From: jsm28 at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 1 Dec 2009 00:08:01 -0000
- Subject: Community source repository for glibc add-on ports branch, master, updated. glibc-2.11-16-g84f9266
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 "Community source repository for glibc add-on ports".
The branch, master has been updated
via 84f926688b3e30910887020fd97456f996450eaf (commit)
from b80ec5369182532a06bf4972ff274bc152d5eda6 (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-ports.git;a=commitdiff;h=84f926688b3e30910887020fd97456f996450eaf
commit 84f926688b3e30910887020fd97456f996450eaf
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Dec 1 00:07:32 2009 +0000
Update MIPS dl-lookup.c from generic version.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index b679aa0..ca8ebd9 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,7 @@
+2009-12-01 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/mips/dl-lookup.c: Update from generic version.
+
2009-11-23 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/stat.h: Use struct timespec
diff --git a/sysdeps/mips/dl-lookup.c b/sysdeps/mips/dl-lookup.c
index b7516da..c7deb4d 100644
--- a/sysdeps/mips/dl-lookup.c
+++ b/sysdeps/mips/dl-lookup.c
@@ -329,16 +329,16 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
definition we have to use it. */
void enter (struct unique_sym *table, size_t size,
unsigned int hash, const char *name,
- const ElfW(Sym) *sym, const struct link_map *map)
+ const ElfW(Sym) *sym, struct link_map *map)
{
size_t idx = hash % size;
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;
+ table[idx].name = name;
if ((type_class & ELF_RTYPE_CLASS_COPY) != 0)
{
table[idx].sym = ref;
@@ -348,7 +348,13 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
{
table[idx].sym = sym;
table[idx].map = map;
+
+ if (map->l_type == lt_loaded)
+ /* Make sure we don't unload this object by
+ setting the appropriate flag. */
+ map->l_flags_1 |= DF_1_NODELETE;
}
+
return;
}
@@ -380,8 +386,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;
@@ -389,10 +394,14 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
idx -= size;
}
- if (size * 3 <= tab->n_elements)
+ if (size * 3 <= tab->n_elements * 4)
{
/* Expand the table. */
- size_t newsize = _dl_higher_prime_number (size);
+#ifdef RTLD_CHECK_FOREIGN_CALL
+ /* This must not happen during runtime relocations. */
+ assert (!RTLD_CHECK_FOREIGN_CALL);
+#endif
+ size_t newsize = _dl_higher_prime_number (size + 1);
struct unique_sym *newentries
= calloc (sizeof (struct unique_sym), newsize);
if (newentries == NULL)
@@ -403,19 +412,25 @@ 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);
tab->free (entries);
tab->size = newsize;
+ size = newsize;
entries = tab->entries = newentries;
tab->free = free;
}
}
else
{
+#ifdef RTLD_CHECK_FOREIGN_CALL
+ /* This must not happen during runtime relocations. */
+ assert (!RTLD_CHECK_FOREIGN_CALL);
+#endif
+
#define INITIAL_NUNIQUE_SYM_TABLE 31
size = INITIAL_NUNIQUE_SYM_TABLE;
entries = calloc (sizeof (struct unique_sym), size);
@@ -427,7 +442,8 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
tab->free = free;
}
- enter (entries, size, new_hash, strtab + sym->st_name, sym, map);
+ enter (entries, size, new_hash, strtab + sym->st_name, sym,
+ (struct link_map *) map);
++tab->n_elements;
__rtld_lock_unlock_recursive (tab->lock);
@@ -610,6 +626,10 @@ add_dependency (struct link_map *undef_map, struct link_map *map, int flags)
unsigned int max
= undef_map->l_reldepsmax ? undef_map->l_reldepsmax * 2 : 10;
+#ifdef RTLD_PREPARE_FOREIGN_CALL
+ RTLD_PREPARE_FOREIGN_CALL;
+#endif
+
newp = malloc (sizeof (*newp) + max * sizeof (struct link_map *));
if (newp == NULL)
{
-----------------------------------------------------------------------
Summary of changes:
ChangeLog.mips | 4 ++++
sysdeps/mips/dl-lookup.c | 38 +++++++++++++++++++++++++++++---------
2 files changed, 33 insertions(+), 9 deletions(-)
hooks/post-receive
--
Community source repository for glibc add-on ports