From owner-freebsd-current Tue Jun 2 11:15:36 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA12714 for freebsd-current-outgoing; Tue, 2 Jun 1998 11:15:36 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from antipodes.cdrom.com (castles327.castles.com [208.214.167.27]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA12703 for ; Tue, 2 Jun 1998 11:15:29 -0700 (PDT) (envelope-from mike@antipodes.cdrom.com) Received: from antipodes.cdrom.com (localhost [127.0.0.1]) by antipodes.cdrom.com (8.8.8/8.8.5) with ESMTP id KAA01018; Tue, 2 Jun 1998 10:11:01 -0700 (PDT) Message-Id: <199806021711.KAA01018@antipodes.cdrom.com> X-Mailer: exmh version 2.0zeta 7/24/97 To: "Scot W. Hetzel" cc: "Mike Smith" , current@FreeBSD.ORG Subject: Re: ppp cannot find libalias In-reply-to: Your message of "Mon, 01 Jun 1998 18:19:46 CDT." <046601bd8db3$c49fa0a0$c3e0d9cf@admin.westbend.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 02 Jun 1998 10:11:01 -0700 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > From: Mike Smith > > >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. > > > Mike, I cleaned up your code, I HATE goto's. Terry likes them. I find them easier to deal with than insane nesting. Unfortunately I can't use your diff as-is as it appears to have suffered catastrophic whitespace damage, but I take your point. Are there any disagreements with the basic idea, ie. use rtfindfile() to locate files requested by dlopen() if they do not contain path components? > Scot > > 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; > + if(smp != NULL) /* Succeeded */ > { > 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(link_map_tail != old_tail) && (reloc_dag(smp, bind_now) != -1) > - if(reloc_dag(smp, bind_now) == -1) /* Failed */ > - return NULL; > init_dag(smp); > else > + smp = NULL; > -} > > unmaphints(); > anon_close(); > } > + free(name); > return smp; > } > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > -- \\ 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