From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41080 invoked by alias); 25 Oct 2019 08:37:09 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 41059 invoked by uid 89); 25 Oct 2019 08:37:08 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 spammy=H*i:sk:f6bcedd, H*f:sk:f6bcedd X-HELO: us-smtp-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571992625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2ailY1Yadquaa2ixqiJ/Khn2tkXXDbJIbdaX3BsGuX4=; b=hjp0a5qOdxEPojGh9EO19sCHYIOYMD3krOyJQRVYWkvZiRFXXDpz3H+k4VQKPOOE0iI+jj UyROYw0FX9d72fiiZwI0T1li0x5Chb9Eef8kLPMkDKGwwhME0ZEhlOIxlUODuJsRDu47Ks Ed6Gpbxf0KkgSfF4+h2Z1c35THEev9Q= From: Florian Weimer To: Carlos O'Donell Cc: libc-alpha Subject: Re: [PATCH] elf: Always set l in _dl_init_paths (Bug 23462). References: <87d0ex6mo6.fsf@oldenburg2.str.redhat.com> <8b35f8b3-1d61-dce0-f59a-42c104449a44@redhat.com> <87bluh53z3.fsf@oldenburg2.str.redhat.com> <79397430-ce3f-446e-eadb-18531ad5ae79@redhat.com> Date: Fri, 25 Oct 2019 08:37:00 -0000 In-Reply-To: (Carlos O'Donell's message of "Thu, 24 Oct 2019 21:16:02 -0400") Message-ID: <87tv7x8bme.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2019-10/txt/msg00741.txt.bz2 * Carlos O'Donell: > This does not turn out to be true. And it makes sense when I think > about it more thoroughly. > > The static executable, lacking a .dynamic section, does not fill in > any of the link maps's l_info data, in fact it's all just a list of > NULLs because there was no data to load. Statically linked executables can have dynamic segments. However, there seems to be a bug in BFD ld because it ignores -rpath for them. > You would have to assemble a static binary with a .dynamic section > and the static linker doesn't want to do that. You can use -static-pie on some targets, then there is a dynamic segment, and BFD ld adds DT_RPATH to it. Thanks, Florian