[PATCH] Append slibdir/libdir instead of prepending
Jakub Jelinek
jakub@redhat.com
Thu Aug 7 09:15:00 GMT 2003
Hi!
The pre-glibc ldconfig did:
/* OK, which directories should we do? */
for (i = optind; i < argc; i++)
scan_dir(argv[i]);
...
/* look ma, no defaults */
if (!nodefault)
{
/* I guess the defaults aren't good enough */
if ((extpath = get_extpath()))
{
for (cp = strtok(extpath, DIR_SEP); cp;
cp = strtok(NULL, DIR_SEP))
scan_dir(cp);
free(extpath);
}
/* everybody needs these, don't they? */
scan_dir("/usr/lib");
scan_dir("/lib");
}
ie. directories from command line came first, then ld.so.conf directories
and /usr/lib and /lib last.
But current ldconfig first adds dirs from command line, then /lib+/usr/lib
and ld.so.conf directories last.
I agree with http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=98966
that the former behaviour made more sense.
2003-08-05 Jakub Jelinek <jakub@redhat.com>
* elf/ldconfig.c (main): Append SLIBDIR and LIBDIR to
config_file directories instead of prepending.
--- libc/elf/ldconfig.c.jj 2003-07-23 04:06:14.000000000 -0400
+++ libc/elf/ldconfig.c 2003-08-05 09:50:09.000000000 -0400
@@ -1117,12 +1117,12 @@ main (int argc, char **argv)
if (!opt_only_cline)
{
+ parse_conf (config_file);
+
/* Always add the standard search paths. */
add_system_dir (SLIBDIR);
if (strcmp (SLIBDIR, LIBDIR))
add_system_dir (LIBDIR);
-
- parse_conf (config_file);
}
search_dirs ();
Jakub
More information about the Libc-hacker
mailing list