[PATCH] ld.so: Adjust the auxv if ld.so is directly invoked

Thomas Schwinge thomas@schwinge.name
Fri Mar 26 20:09:00 GMT 2010


Hello!

On Wed, Jan 13, 2010 at 11:21:39AM +0100, Andreas Krebbel wrote:
> The attached patch adds a new parameter to dl_main which holds a
> pointer to the auxv on the stack.  That way it is possible to rescan
> the vector and adjust several values in dl_main.

> 2010-01-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
> 
> 	* elf/dl-sysdep.c (_dl_sysdep_start): Added the auxv parameter to
> 	dl_main.
> 	* elf/dl-open.c (_dl_sysdep_start): Likewise..
> 	* sysdeps/generic/ldsodefs.h (_dl_sysdep_start): Likewise.
> 	* elf/rtld.c (dl_main): Added new parameter auxv.  Adjust the
> 	AT_PHDR, AT_PHNUM and AT_ENTRY fields if the ld.so is directly
> 	started.

This was committed (and I agree with that patch's idea), but there is a
gotcha: not all supported architectures of glibc have an auxv.

There is the HAVE_AUX_VECTOR conditional -- but this isn't used in all
applicable places, I'm afraid.

Would the glibc maintainers rather have me send a patch (a) for
conditionalizing all auxv code on that conditional, or (b) have the
generic code cope with auxv == NULL?


Regards,
 Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20100326/3bbc7a66/attachment.sig>


More information about the Libc-alpha mailing list