1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

Sat Jun 15 18:13:43 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>

* sysdeps/unix/sysv/linux/Dist: Add sys/klog.h.

	* elf/dl-open.c (_dl_open): Remove PARENT argument, pass null.
	* elf/link.h: Update prototype.
	* elf/dl-load.c (_dl_map_object): If dependents' DT_RPATHs don't find
	NAME, try the DT_RPATH of the executable itself if dynamic.
	* elf/dlopen.c (dlopen): Don't pass first arg to _dl_open.

	* elf/dl-load.c (_dl_map_object): Exit DT_RPATH checking loop when an
	open succeeds.

	* Makerules (build-shlib): Give -L opts for each elt of $(rpath-link).

	* sysdeps/mach/hurd/Makefile (sysdep-LDFLAGS): Variable removed.
	(rpath-link): Append to this instead.
This commit is contained in:
Roland McGrath
1996-06-16 01:27:54 +00:00
parent f332db0256
commit a23db8e4af
8 changed files with 41 additions and 18 deletions

View File

@ -469,13 +469,24 @@ _dl_map_object (struct link_map *loader, const char *name, int type)
}
fd = -1;
for (l = loader; l; l = l->l_loader)
/* First try the DT_RPATH of the dependent object that caused NAME
to be loaded. Then that object's dependent, and on up. */
for (l = loader; fd == -1 && l; l = l->l_loader)
if (l && l->l_info[DT_RPATH])
trypath ((const char *) (l->l_addr +
l->l_info[DT_STRTAB]->d_un.d_ptr +
l->l_info[DT_RPATH]->d_un.d_val));
/* If dynamically linked, try the DT_RPATH of the executable itself. */
l = _dl_loaded;
if (fd == -1 && l && l->l_type != lt_loaded)
trypath ((const char *) (l->l_addr +
l->l_info[DT_STRTAB]->d_un.d_ptr +
l->l_info[DT_RPATH]->d_un.d_val));
/* Try an environment variable (unless setuid). */
if (fd == -1 && ! _dl_secure)
trypath (getenv ("LD_LIBRARY_PATH"));
/* Finally, try the default path. */
if (fd == -1)
{
extern const char *_dl_rpath; /* Set in rtld.c. */