Date: Mon, 01 Jun 1998 12:04:30 -0700 From: Mike Smith <mike@smith.net.au> To: "Jordan K. Hubbard" <jkh@time.cdrom.com> Cc: Mike Smith <mike@smith.net.au>, ben@stuyts.nl, current@FreeBSD.ORG, brian@awfulhak.org Subject: Re: ppp cannot find libalias Message-ID: <199806011904.MAA00827@dingo.cdrom.com> In-Reply-To: Your message of "Mon, 01 Jun 1998 09:03:16 PDT." <22316.896716996@time.cdrom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > This is the wrong place to do it. dlopen() should honour the standard
> > library path for the format of the executable calling it. I proposed an
>
> So you're basically saying we should search through the hint cache or,
> if set, the LD_LIBRARY_PATH instead. Well fine. I had one idea for
> fixing it and I sent in my diffs. You then shot down my idea with
> a better one and ... - please complete the sentence. :-)
Not even the hint cache. Note that this is the a.out rtld; I don't
know (yet) where to look for the ELF one.
Index: rtld.c
===================================================================
RCS file: /uluru1/ncvs/src/gnu/usr.bin/ld/rtld/rtld.c,v
retrieving revision 1.52
diff -u -r1.52 rtld.c
--- rtld.c 1998/02/06 16:46:46 1.52
+++ rtld.c 1998/06/01 20:11:27
@@ -1902,29 +1902,34 @@
struct so_map *old_tail = link_map_tail;
struct so_map *smp;
int bind_now = mode == RTLD_NOW;
+ char *name;
- /*
- * path == NULL is handled by map_object()
- */
-
anon_open();
+ if (path == NULL)
+ return NULL;
+
+ /* If path is not qualified, search for it on the standard searchpath */
+ name = (strchr(path, '/') != NULL) ? strdup(path) : rtfindfile(path);
+
/* Map the object, and the objects on which it depends */
smp = map_object(path, (struct sod *) NULL, (struct so_map *) NULL);
if(smp == NULL) /* Failed */
- return NULL;
+ goto depart;
LM_PRIVATE(smp)->spd_flags |= RTLD_DL;
/* Relocate and initialize all newly-mapped objects */
if(link_map_tail != old_tail) { /* We have mapped some new objects */
if(reloc_dag(smp, bind_now) == -1) /* Failed */
- return NULL;
+ smp = NULL, goto depart;
init_dag(smp);
}
unmaphints();
anon_close();
+ depart:
+ free(name);
return smp;
}
--
\\ Sometimes you're ahead, \\ Mike Smith
\\ sometimes you're behind. \\ mike@smith.net.au
\\ The race is long, and in the \\ msmith@freebsd.org
\\ end it's only with yourself. \\ msmith@cdrom.com
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806011904.MAA00827>
