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 8015 invoked from network); 16 Jun 2020 01:16:55 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 16 Jun 2020 01:16:55 -0000 Received: (qmail 24031 invoked by uid 550); 16 Jun 2020 01:16:51 -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 24013 invoked from network); 16 Jun 2020 01:16:50 -0000 Date: Mon, 15 Jun 2020 21:16:38 -0400 From: Rich Felker To: Jeffrey Walton Cc: musl@lists.openwall.com Message-ID: <20200616011638.GH6430@brightrain.aerifal.cx> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] Is Musl responsible for runpath parsing in an elf file? 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. Rich