From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76657 invoked by alias); 25 Oct 2019 01:16:10 -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 72874 invoked by uid 89); 25 Oct 2019 01:16:08 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=wondered, HX-Languages-Length:1635, thoroughly, briefly X-HELO: mx1.redhat.com Subject: Re: [PATCH] elf: Always set l in _dl_init_paths (Bug 23462). From: Carlos O'Donell To: Florian Weimer Cc: libc-alpha 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> Message-ID: Date: Fri, 25 Oct 2019 01:16:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <79397430-ce3f-446e-eadb-18531ad5ae79@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-10/txt/msg00730.txt.bz2 On 10/16/19 9:31 AM, Carlos O'Donell wrote: > On 10/16/19 7:23 AM, Florian Weimer wrote: >> * Carlos O'Donell: >> >>>> Does this change enable DT_RUNPATH/DT_RPATH for statically linked >>>> binaries? Should that receive a NEWS entry and a test? >>> >>> It does enable DT_RUNPATH/DT_RPATH for statically linked binaries, >>> and we should probably add a test for that? >> >> Right. > > Perfect, let me do that. I'll add another test. 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. Any subsequently loaded DSO will have such things, but they are already handled by the DSO loading code. You would have to assemble a static binary with a .dynamic section and the static linker doesn't want to do that. Therefore it's not a new feature. We would have to add a LD_RUNPATH or LD_RPATH to feed this data into the binary via an environment variable. >>> If you think the semantic change here is wrong, please call that out. >> >> No, I think it would be a useful feature. I sort-of ran into this here: >> >> resolv/tst-idna_name_classify: Isolate from system libraries >> >> >> And I briefly wondered if we should do this automatically for >> --enable-hardcoded-path-in-tests. Given the above, do you think the original patch is good as-is? Did I miss something else? -- Cheers, Carlos.