From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8804 invoked from network); 17 Jun 2020 19:41:08 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 17 Jun 2020 19:41:08 -0000 Received: (qmail 17735 invoked by uid 550); 17 Jun 2020 19:41:05 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 17714 invoked from network); 17 Jun 2020 19:41:04 -0000 Date: Wed, 17 Jun 2020 21:40:53 +0200 From: Szabolcs Nagy To: Jeffrey Walton Cc: Rich Felker , musl@lists.openwall.com Message-ID: <20200617194053.GC2048759@port70.net> Mail-Followup-To: Jeffrey Walton , Rich Felker , musl@lists.openwall.com References: <20200616011638.GH6430@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [musl] Is Musl responsible for runpath parsing in an elf file? * Jeffrey Walton [2020-06-15 21:25:15 -0400]: > On Mon, Jun 15, 2020 at 9:16 PM Rich Felker wrote: > > On Mon, Jun 15, 2020 at 08:45:18PM -0400, Jeffrey Walton wrote: > > > Hi Everyone, > > > > > > Please forgive my ignorance... Is Musl responsible for runpath parsing > > > during elf loading? If it matters, I'm working on Alpine Linux. > > > > Yes, loading of all libraries except the dynamic linker itself (which > > includes libc on musl) is the responsibility of the dynamic linker and > > is performed in userspace. > > > > When searching for a given library as a dependency (DT_NEEDED), musl's > > processing of rpath/runpath uses the runpath of the shared object > > that's depending on it and causing it to be pulled in, and continues > > this resolution recursively backwards, potentially up to the main > > program's runpath, if not found. > > Thanks Rich. > > I may have mis-filed this against Alpine: > https://gitlab.alpinelinux.org/alpine/aports/-/issues/11655. > > Is it expected behavior? Should I move it to Musl bug tracker? yeah i remember this discussion https://sourceware.org/legacy-ml/binutils/2019-06/msg00014.html i think there is no good solution, you have to figure out the right level of escape magic for your build system when passing runpath flags.