From owner-freebsd-current Mon Jun 1 13:10:36 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA20866 for freebsd-current-outgoing; Mon, 1 Jun 1998 13:10:36 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA20831 for ; Mon, 1 Jun 1998 13:10:25 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.8.8/8.8.5) with ESMTP id MAA00827; Mon, 1 Jun 1998 12:04:30 -0700 (PDT) Message-Id: <199806011904.MAA00827@dingo.cdrom.com> X-Mailer: exmh version 2.0zeta 7/24/97 To: "Jordan K. Hubbard" cc: Mike Smith , ben@stuyts.nl, current@FreeBSD.ORG, brian@awfulhak.org Subject: Re: ppp cannot find libalias In-reply-to: Your message of "Mon, 01 Jun 1998 09:03:16 PDT." <22316.896716996@time.cdrom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 01 Jun 1998 12:04:30 -0700 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > 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