]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(_dl_map_object): Use LD_LIBRARY_PATH envvar if global variable
authorUlrich Drepper <drepper@redhat.com>
Thu, 9 Apr 1998 17:39:34 +0000 (17:39 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 9 Apr 1998 17:39:34 +0000 (17:39 +0000)
_dl_library_path is not set.

elf/dl-load.c

index 4773ab05f6367d2548bd3585fb44695fa379cc98..012613579f99a59cb6f48e6008905bb79a3f889c 100644 (file)
@@ -597,6 +597,10 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
            NULL
          };
 
+         /* For static binaries _dl_library_path might be uninitialized.  */
+         if (_dl_library_path == NULL)
+           _dl_library_path = getenv ("LD_LIBRARY_PATH");
+
          trypath (_dl_library_path, trusted_dirs);
        }
       if (fd == -1)