From: Adhemerval Zanella Date: Tue, 17 Oct 2023 14:50:35 +0000 (-0300) Subject: elf: Do not print the cache entry if --inhibit-cache is used X-Git-Tag: glibc-2.39~361 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c06e10c8130358c409c1d2837f8171ef70169d03;p=thirdparty%2Fglibc.git elf: Do not print the cache entry if --inhibit-cache is used So --help informs the correct shared library search path. Reviewed-by: Florian Weimer --- diff --git a/elf/dl-usage.c b/elf/dl-usage.c index 98f0b0d027c..04315451f22 100644 --- a/elf/dl-usage.c +++ b/elf/dl-usage.c @@ -99,7 +99,8 @@ print_search_path_for_help (struct dl_main_state *state) if (map != NULL) print_search_path_for_help_1 (map->l_runpath_dirs.dirs); - _dl_printf (" (libraries located via %s)\n", LD_SO_CACHE); + if (!GLRO(dl_inhibit_cache)) + _dl_printf (" (libraries located via %s)\n", LD_SO_CACHE); print_search_path_for_help_1 (__rtld_search_dirs.dirs); }