From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 560623858016 for ; Mon, 11 Jul 2022 18:41:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 560623858016 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-547-pTRCzZH8Mj2i6LIhjOIiJg-1; Mon, 11 Jul 2022 14:41:33 -0400 X-MC-Unique: pTRCzZH8Mj2i6LIhjOIiJg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C191D85A584; Mon, 11 Jul 2022 18:41:32 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BA958C28118; Mon, 11 Jul 2022 18:41:31 +0000 (UTC) From: Florian Weimer To: Adhemerval Zanella via Libc-help Cc: N , Adhemerval Zanella Subject: Re: Bug Report: ldd introduces non-deterministic behavior in subsequent piped commands References: <0672659a-10d8-99b5-5f76-cdd28a282eb8@gmail.com> <544CCC5B-009C-4E74-AB78-67CC28674C56@linaro.org> Date: Mon, 11 Jul 2022 20:41:29 +0200 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") Message-ID: <87sfn71oh2.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2022 18:41:39 -0000 * 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