This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: BZ #14683: Static dlopen abort on $ORIGIN
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 11 Oct 2012 16:44:16 -0700 (PDT)
- Subject: Re: PATCH: BZ #14683: Static dlopen abort on $ORIGIN
- References: <20121008010027.GA2297@gmail.com>
> --- a/elf/dl-open.c
> +++ b/elf/dl-open.c
> @@ -206,6 +206,14 @@ dl_open_worker (void *a)
> goto found_caller;
> }
>
> +#ifndef SHARED
> + /* In statically linked apps there might be only vDSO. */
> + if (call_map
> + && (caller_dlopen < (const void *) call_map->l_map_start
> + || caller_dlopen >= (const void *) call_map->l_map_end))
> + call_map = NULL;
> +#endif
> +
> found_caller:
> if (args->nsid == __LM_ID_CALLER)
> {
It should just omit the initial setting of CALL_MAP for !SHARED,
shouldn't it?
Thanks,
Roland