[PATCH] Fix ld.so RUNPATH handling
Jakub Jelinek
jakub@redhat.com
Wed Oct 31 08:31:00 GMT 2001
Hi!
DT_RUNPATH worked the same way as DT_RPATH, ie. it could not be overridden
with LD_LIBRARY_PATH. Although the library could be found using
LD_LIBRARY_PATH and was opened by ld.so, it called open_path once again and
used the libs found through DT_RUNPATH.
2001-10-31 Jakub Jelinek <jakub@redhat.com>
* elf/dl-load.c (_dl_map_object): If library was found using
LD_LIBRARY_PATH, don't try RUNPATH list.
--- libc/elf/dl-load.c.jj Thu Sep 27 23:26:27 2001
+++ libc/elf/dl-load.c Wed Oct 31 16:39:56 2001
@@ -1608,7 +1608,8 @@ _dl_map_object (struct link_map *loader,
&realname, &fb);
/* Look at the RUNPATH information for this binary. */
- if (loader != NULL && loader->l_runpath_dirs.dirs != (void *) -1)
+ if (loader != NULL && loader->l_runpath_dirs.dirs != (void *) -1
+ && fd == -1)
{
if (loader->l_runpath_dirs.dirs == NULL)
{
Jakub
More information about the Libc-hacker
mailing list