and let user overwrite the value using new --library-path option.
int _dl_argc;
char **_dl_argv;
const char *_dl_rpath;
+const char *_dl_library_path;
/* Set nonzero during loading and initialization of executable and
libraries, cleared before the executable's entry point runs. This
char *file;
mode = getenv ("LD_TRACE_LOADED_OBJECTS") != NULL ? trace : normal;
+ _dl_library_path = getenv ("LD_LIBRARY_PATH");
/* LAZY is determined by the parameters --datadeps and --function-deps
if we trace the binary. */
--_dl_argc;
++_dl_argv;
}
+ else if (! strcmp (_dl_argv[1], "--library-path")
+ && _dl_argc > 2)
+ {
+ _dl_library_path = _dl_argv[2];
+ _dl_skip_args += 2;
+ _dl_argc -= 2;
+ _dl_argv += 2;
+ }
else
break;