From: Raman Tenneti Date: Fri, 17 Aug 2018 18:31:35 +0000 (-0700) Subject: Undid the dl_enable_fastload environment variable changes. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb9e16c6eaa8026377827b423b606e94c9a5e0f4;p=thirdparty%2Fglibc.git Undid the dl_enable_fastload environment variable changes. --- diff --git a/elf/dl-load.c b/elf/dl-load.c index 6f08e8ad131..0906de556ce 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -1948,7 +1948,7 @@ _dl_map_object (struct link_map *loader, const char *name, off_t offset, assert (nsid < GL(dl_nns)); /* Look for this name among those already loaded. */ - if (!GLRO(dl_enable_fastload) || name[0] == '\0') + if (name[0] == '\0') { /* Special case: both main exe and vdso can have empty name; so search from head: it is important to return the map for main diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c index 297ff9dec5b..06db4e2b941 100644 --- a/elf/dl-lookup.c +++ b/elf/dl-lookup.c @@ -793,8 +793,6 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash, __asm volatile ("" : "+r" (n), "+m" (scope->r_list)); struct link_map **list = scope->r_list; - if (GLRO(dl_enable_fastload)) - { if (scope == GL(dl_ns)[LM_ID_BASE]._ns_main_searchlist && i == 0) { const int skip_to = earliest_pos_from_hash_table (undef_name); @@ -820,7 +818,6 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash, return 0; } } - } do { diff --git a/elf/dl-support.c b/elf/dl-support.c index 4f1c9de4c5c..a097f22a166 100644 --- a/elf/dl-support.c +++ b/elf/dl-support.c @@ -147,7 +147,6 @@ dl_position_table_entry_t *_dl_position_hash_table; int _dl_position_hash_mask; int _dl_position_hash_cutoff = DL_POSITION_HASH_CUTOFF_DEFAULT; int _dl_position_hash_bits; -int _dl_enable_fastload = 1; size_t _dl_pagesize = EXEC_PAGESIZE; diff --git a/elf/dl-version.c b/elf/dl-version.c index 6c1d9412333..8a1e806c67c 100644 --- a/elf/dl-version.c +++ b/elf/dl-version.c @@ -34,7 +34,7 @@ find_needed (const char *name, struct link_map *map) struct link_map *tmap; unsigned int n; - if (!GLRO(dl_enable_fastload) || name[0] == '\0') + if (name[0] == '\0') { /* Special case: both main exe and vdso can have empty name; so search from head: it is important to return the map for main @@ -51,6 +51,7 @@ find_needed (const char *name, struct link_map *map) if (_dl_name_match_p (name, tmap)) return tmap; } + /* The required object is not in the global scope, look to see if it is a dependency of the current object. */ for (n = 0; n < map->l_searchlist.r_nlist; n++) diff --git a/elf/rtld.c b/elf/rtld.c index 4f61d49d0ac..a0b22c4bb3e 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -293,7 +293,6 @@ struct rtld_global_ro _rtld_global_ro attribute_relro = ._dl_tls_get_addr_soft = _dl_tls_get_addr_soft, ._dl_position_hash_cutoff = DL_POSITION_HASH_CUTOFF_DEFAULT, ._dl_position_hash_bits = 0, - ._dl_enable_fastload = 1, #ifdef HAVE_DL_DISCOVER_OSVERSION ._dl_discover_osversion = _dl_discover_osversion #endif @@ -1773,7 +1772,6 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", /* We have now finished loading every required (linked-in) object. Set up the position hash if needed. */ - if (GLRO(dl_enable_fastload) == 1) _dl_fill_position_hash (main_map); HP_TIMING_NOW (stop); @@ -2706,12 +2704,6 @@ process_envvars (enum mode *modep) = _dl_strtoul (&envline[16], NULL);; break; - case 16: - if (memcmp (envline, "FASTLOAD_ENABLED", 16) == 0) - GLRO(dl_enable_fastload) - = _dl_strtoul (&envline[17], NULL);; - break; - case 18: if (memcmp (envline, "FASTLOAD_HASH_BITS", 18) == 0) GLRO(dl_position_hash_bits) diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 1df593c96b1..329a367ded0 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -594,7 +594,6 @@ struct rtld_global_ro EXTERN int _dl_position_hash_mask; EXTERN int _dl_position_hash_bits; EXTERN int _dl_position_hash_cutoff; - EXTERN int _dl_enable_fastload; #define DL_POSITION_HASH_BITS_MAX 27 /* (1 << 27) entries. */ #if defined(__powerpc__) && !defined(__powerpc64__)