]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf: Do not print the cache entry if --inhibit-cache is used
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 17 Oct 2023 14:50:35 +0000 (11:50 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 18 Oct 2023 11:01:42 +0000 (08:01 -0300)
So --help informs the correct shared library search path.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
elf/dl-usage.c

index 98f0b0d027c9fd0e42ed21739866d7fb183c8392..04315451f22cb3f7f7edaf0a926f58c180186631 100644 (file)
@@ -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);
 }