public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Vincent Mihalkovic <vmihalko@redhat.com>
To: Florian Weimer <fweimer@redhat.com>,
	libc-alpha@sourceware.org,  Kamil Dudka <kdudka@redhat.com>
Subject: Re: [PATCH] ld.so: add an --argv0 option
Date: Sun, 26 Jul 2020 22:00:43 +0200	[thread overview]
Message-ID: <CALjvMRXUyFW12KMhPW64QtvV25v4zCGqQx8g_zJypyvkYnerpw@mail.gmail.com> (raw)
In-Reply-To: <877duvkjpr.fsf@oldenburg2.str.redhat.com>

Hi,

Sorry, I forgot to CC the libc-alpha mailing-list on my reply.

We do not need the option for shell scripting, where it is indeed not
needed,
as you say.  We are developing a tool for running dynamic analysis tools on
RPM packages fully automatically.  The tool appends custom linker flags
while
executing the %build section of RPMs to make the binaries use our custom ELF
interpreter.  While running the %check section, the interpreter takes care
of
running the binaries built in %build through the selected dynamic analyzer
in
a way that does not break the testing framework.  For this to work, we need
to run dynamic linker explicitly.  There is currently no way to preserve the
original argv[0], which some programs are sensitive to.  This unnecessarily
breaks the tests running in %check of some RPM packages.

An experimental implementation of the custom ELF interpreter is available
here:

    https://github.com/kdudka/cswrap/pull/2

thanks for considering this idea,
vincent mihalkovic

On Wed, Jul 22, 2020 at 11:00 AM Florian Weimer <fweimer@redhat.com> wrote:

> * Vincent Mihalkovic via Libc-alpha:
>
> > a few years ago there was an effort for adding --argv0 option:
> > https://sourceware.org/legacy-ml/libc-alpha/2016-04/msg00576.html.
> > I made the old patch actual for version 2.31.9000, added a test case and
> > changelog.
>
> Many shells support “exec -a” to get a similar effect.  The advantage is
> that this does not perturb the argument vector layout.  Given that, I
> think promoting --argv0 would merely introduce further compatibility
> issues.
>
> Thanks,
> Florian
>
>

  reply	other threads:[~2020-07-26 20:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-22  8:33 Vincent Mihalkovic
2020-07-22  9:00 ` Florian Weimer
2020-07-26 20:00   ` Vincent Mihalkovic [this message]
2020-07-27  5:54     ` Florian Weimer
  -- strict thread matches above, loose matches on Subject: below --
2020-08-12 11:06 Vincent Mihalkovic
2020-08-25 15:10 ` Adhemerval Zanella
2016-04-23  5:28 Mike Frysinger
2016-04-23 12:21 ` Florian Weimer
2016-04-23 20:06   ` Mike Frysinger
2016-04-24 12:21     ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALjvMRXUyFW12KMhPW64QtvV25v4zCGqQx8g_zJypyvkYnerpw@mail.gmail.com \
    --to=vmihalko@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=kdudka@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).