[PATCH] ld.so: add an --argv0 option
Mike Frysinger
vapier@gentoo.org
Sat Apr 23 20:06:00 GMT 2016
On 23 Apr 2016 14:21, Florian Weimer wrote:
> * Mike Frysinger:
> > Sometimes when you run a program you want the argv[0] string passed to
> > the app to be different than the actual path you used to load it. We
> > can't do this today with invoking via ld.so which can be limiting --
> > some programs like to inspect their argv[0] and make decisions as to
> > how it should (re)exec itself or helper tools. For example, clang and
> > gcc both do argv[0] inspection to support relocatable toolchains.
>
> Interesting idea. I think it's sufficiently to include this, but it
> needs a ChangeLog entry and a test case.
for the test, seems like i'll have to write a small C file that just
displays its argv, and then another shell script which runs the ldso
against that simple program and checks the output. unless anyone has
a simpler idea.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160423/b6c6bda0/attachment.sig>
More information about the Libc-alpha
mailing list