[PATCH] Add dynamic linker support for $EXEC_ORIGIN.
Brooks Moses
bmoses@google.com
Tue Dec 10 01:49:00 GMT 2013
On Mon, Dec 9, 2013 at 4:25 PM, Paul Pluzhnikov <ppluzhnikov@google.com> 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).
Ack, thanks. I'll roll that into a v2 of the patch along with any
other review comments.
- Brooks
More information about the Libc-alpha
mailing list