This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add dynamic linker support for $EXEC_ORIGIN.
- From: Rich Felker <dalias at aerifal dot cx>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: Brooks Moses <bmoses at google dot com>, libc-alpha at sourceware dot org, Carlos O'Donnell <carlos at redhat dot com>
- Date: Mon, 9 Dec 2013 19:46:38 -0500
- Subject: Re: [PATCH] Add dynamic linker support for $EXEC_ORIGIN.
- Authentication-results: sourceware.org; auth=none
- References: <1386634331-21691-1-git-send-email-bmoses at google dot com> <CALoOobPF0XwKE+hvsCjeX8Q2dnPvpx_Qq+aX9qT_aogu1DGeVA at mail dot gmail dot com>
On Mon, Dec 09, 2013 at 04:25:19PM -0800, Paul Pluzhnikov wrote:
> On Mon, Dec 9, 2013 at 4:12 PM, Brooks Moses <bmoses@google.com> wrote:
>
> > +/* Iterate over auxv, find AT_EXECFN if any. */
> > +static char *
> > +get_at_execfn (ElfW(auxv_t) *auxv)
> > +{
> > + assert (auxv != NULL);
> > +
> > + for (; auxv->a_type != AT_NULL; ++auxv)
> > + if (auxv->a_type == AT_EXECFN)
> > + return (char *) auxv->a_un.a_val;
> > +
> > + return NULL;
> > +}
>
> get_at_execfn can be replaced with getauxval (AT_EXECFN)
>
> (getauxval() didn't exist in 2.15, but is there now).
Before getauxval enters widespread use, can somebody please review bug
#15846 regarding the interface being broken?
Rich