Date: Tue, 02 Jun 1998 10:11:01 -0700 From: Mike Smith <mike@smith.net.au> To: "Scot W. Hetzel" <hetzels@westbend.net> Cc: "Mike Smith" <mike@smith.net.au>, current@FreeBSD.ORG Subject: Re: ppp cannot find libalias Message-ID: <199806021711.KAA01018@antipodes.cdrom.com> In-Reply-To: Your message of "Mon, 01 Jun 1998 18:19:46 CDT." <046601bd8db3$c49fa0a0$c3e0d9cf@admin.westbend.net>
next in thread | previous in thread | raw e-mail | index | archive | help
> From: Mike Smith <mike@smith.net.au>
>
> >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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806021711.KAA01018>
