* MIPS dl-lookup.c update (doubled word)
@ 2011-05-10 15:54 Joseph S. Myers
2011-05-13 10:12 ` Joseph S. Myers
0 siblings, 1 reply; 2+ messages in thread
From: Joseph S. Myers @ 2011-05-10 15:54 UTC (permalink / raw)
To: libc-ports
I've applied this patch to bring the MIPS dl-lookup.c up to date again
with the generic version (which had a recent doubled-word comment fix).
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 453774f..2003dff 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,7 @@
+2011-05-10 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/mips/dl-lookup.c: Update from generic version.
+
2011-04-11 Joseph Myers <joseph@codesourcery.com>
* sysdeps/mips/dl-tls.h (TLS_DTV_UNALLOCATED): Define.
diff --git a/sysdeps/mips/dl-lookup.c b/sysdeps/mips/dl-lookup.c
index 50d42fc..78c9f8e 100644
--- a/sysdeps/mips/dl-lookup.c
+++ b/sysdeps/mips/dl-lookup.c
@@ -211,7 +211,7 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
might exist in more than one form
If the library does not provide symbol version information
- there is no problem at at: we simply use the symbol if it
+ there is no problem at all: we simply use the symbol if it
is defined.
These two lookups need to be handled differently if the
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: MIPS dl-lookup.c update (doubled word)
2011-05-10 15:54 MIPS dl-lookup.c update (doubled word) Joseph S. Myers
@ 2011-05-13 10:12 ` Joseph S. Myers
0 siblings, 0 replies; 2+ messages in thread
From: Joseph S. Myers @ 2011-05-13 10:12 UTC (permalink / raw)
To: libc-ports
And another dl-lookup.c update for another libc change.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 2003dff..bcc2c18 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,7 @@
+2011-05-13 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/mips/dl-lookup.c: Update from generic version.
+
2011-05-10 Joseph Myers <joseph@codesourcery.com>
* sysdeps/mips/dl-lookup.c: Update from generic version.
diff --git a/sysdeps/mips/dl-lookup.c b/sysdeps/mips/dl-lookup.c
index 78c9f8e..6b36c34 100644
--- a/sysdeps/mips/dl-lookup.c
+++ b/sysdeps/mips/dl-lookup.c
@@ -329,39 +329,21 @@ 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, struct link_map *map)
+ const ElfW(Sym) *sym, const struct link_map *map)
{
size_t idx = hash % size;
size_t hash2 = 1 + hash % (size - 2);
- while (1)
+ while (table[idx].name != NULL)
{
- if (table[idx].name == NULL)
- {
- table[idx].hashval = hash;
- table[idx].name = name;
- if ((type_class & ELF_RTYPE_CLASS_COPY) != 0)
- {
- table[idx].sym = ref;
- table[idx].map = undef_map;
- }
- else
- {
- 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;
- }
-
idx += hash2;
if (idx >= size)
idx -= size;
}
+
+ table[idx].hashval = hash;
+ table[idx].name = name;
+ table[idx].sym = sym;
+ table[idx].map = map;
}
struct unique_sym_table *tab
@@ -467,8 +449,19 @@ 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,
- (struct link_map *) map);
+ if ((type_class & ELF_RTYPE_CLASS_COPY) != 0)
+ enter (entries, size, new_hash, strtab + sym->st_name, ref,
+ undef_map);
+ else
+ {
+ enter (entries, size, new_hash, strtab + sym->st_name, sym,
+ map);
+
+ if (map->l_type == lt_loaded)
+ /* Make sure we don't unload this object by
+ setting the appropriate flag. */
+ ((struct link_map *) map)->l_flags_1 |= DF_1_NODELETE;
+ }
++tab->n_elements;
__rtld_lock_unlock_recursive (tab->lock);
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-13 10:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-10 15:54 MIPS dl-lookup.c update (doubled word) Joseph S. Myers
2011-05-13 10:12 ` Joseph S. Myers
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).