public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella via Libc-help <libc-help@sourceware.org>
Cc: N <dundir@gmail.com>,
	 Adhemerval Zanella <adhemerval.zanella@linaro.org>
Subject: Re: Bug Report: ldd introduces non-deterministic behavior in subsequent piped commands
Date: Mon, 11 Jul 2022 20:41:29 +0200	[thread overview]
Message-ID: <87sfn71oh2.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <544CCC5B-009C-4E74-AB78-67CC28674C56@linaro.org> (Adhemerval Zanella via Libc-help's message of "Mon, 11 Jul 2022 15:21:29 -0300")

* Adhemerval Zanella via Libc-help:

> Although I do not characterize this as a bug, since it represents the
> ELF objects are already being loaded by the kernel, it is already 
> done since d7703d3176d225d5743b21811d888619eba39e82 (to be included
> in 2.36):
>
> $ LD_TRACE_LOADED_OBJECTS=1 ./elf/ld-linux-x86-64.so.2 /bin/true
>         linux-vdso.so.1 => linux-vdso.so.1 (0x00007fff4c1d1000)
>         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7e75469000)
>         /lib64/ld-linux-x86-64.so.2 => ./elf/ld-linux-x86-64.so.2 (0x00007f7e756ba000)
>
> Using LD_TRACE_LOADED_OBJECTS=2 also prints the binary itself:
>
> $ LD_TRACE_LOADED_OBJECTS=2 ./elf/ld-linux-x86-64.so.2 /bin/true
>         /bin/true => /bin/true (0x00007f0aebc1c000)
>         linux-vdso.so.1 => linux-vdso.so.1 (0x00007ffc0f9b3000)
>         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0aeb9d3000)
>         /lib64/ld-linux-x86-64.so.2 => ./elf/ld-linux-x86-64.so.2 (0x00007f0aebc24000)
>
> And now that you brought it, I wonder if this would case some disruption.
> I think we might need to filter this out to keep the current lld behavior,
> I am not sure.

Should we always print the soname on the LHS (except maybe when printing
the main executable)?  /lib64/ld-linux-x86-64.so.2 is a bit of an
outlier because it's not the soname, but its default installation path.

Thanks,
Florian


  reply	other threads:[~2022-07-11 18:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-09  1:28 N
2022-07-11 18:21 ` Adhemerval Zanella
2022-07-11 18:41   ` Florian Weimer [this message]
2022-07-12 10:40     ` Adhemerval Zanella Netto

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=87sfn71oh2.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=dundir@gmail.com \
    --cc=libc-help@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).