From: Ulrich Drepper Date: Thu, 23 Jul 2009 14:40:56 +0000 (-0700) Subject: Minor optimization of unloading prevention patch. X-Git-Tag: fedora/glibc-2.10.90-7~1^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c15b1d20cd31d9c1498a1863a0a65ecfec4f2513;p=thirdparty%2Fglibc.git Minor optimization of unloading prevention patch. References to unique symbols from copy relocations can only come from executables which cannot be unloaded anyway. Optimize the code to set the unload flag a bit. --- diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c index 61e8d7f0856..18f728812e9 100644 --- a/elf/dl-lookup.c +++ b/elf/dl-lookup.c @@ -331,12 +331,12 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash, { table[idx].sym = sym; table[idx].map = map; - } - if (table[idx].map->l_type == lt_loaded) - /* Make sure we don't unload this object by - setting the appropriate flag. */ - table[idx].map->l_flags_1 |= DF_1_NODELETE; + 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; }