From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12860 Path: news.gmane.org!.POSTED!not-for-mail From: "Bob B." Newsgroups: gmane.linux.lib.musl.general Subject: Re: dl_iterate_phdr() behaves differently on musl and glibc Date: Wed, 30 May 2018 14:33:07 +0200 Message-ID: References: <20180528200243.GH1392@brightrain.aerifal.cx> <20180528221650.GJ1392@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1527683480 3255 195.159.176.226 (30 May 2018 12:31:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 30 May 2018 12:31:20 +0000 (UTC) Cc: musl@lists.openwall.com, ararslan@comcast.net, jakub@jirutka.cz To: "Jameson Nash" Original-X-From: musl-return-12876-gllmg-musl=m.gmane.org@lists.openwall.com Wed May 30 14:31:15 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1fO0G1-0000gr-2A for gllmg-musl@m.gmane.org; Wed, 30 May 2018 14:31:13 +0200 Original-Received: (qmail 14120 invoked by uid 550); 30 May 2018 12:33:21 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 14097 invoked from network); 30 May 2018 12:33:21 -0000 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:cbLU88viXxpvlsTu/vEuQEQGbT0gHkMxP2z5VClSJn0 dh7kSplwkP4gEd9va2IC3LoLfMnWolfEHhHg2Q2u9BfA2CHtuu uwFIoRmqC8nW0GYKXj0PTSBEgopLBQ658NlwMWUPzeHAJlqx4s Z+3YtiTmWGrdpLgJ3hRO2hSHaD87ipr07n8i3AcHTHsj8MhC2E c21ocvew/2zOnVaVm+qdWemwgBNt1KRAc+0ARgdXXv8BYpD8p+ WMoBuNa7HNTzCknXGPT3iuJS2MHwj6kX/xwchY6V7fGisBQ1Rs BWZkIc= X-UI-Out-Filterresults: notjunk:1;V01:K0:8lFFoKKDNsc=:afIrsUMCyTVAjJ0jykLJcx OOaKAYT/uefpZgeGTUuVM5vNVhXGttz5RKb0fziurLq/qYmsVZAPOw1yI3D3QVk0TSHQiAm6K iLveB/fEQMmH6tLQoMjprYu8BcHRlUvp2MWdWthOahLnO0erNY4gZOV32NA4le5+C8eMtMut7 Psv3zSXAEbg9+v0maaGvB7QExSKmd29/ZX7BRBauCBpLrdZjCduFOPk2RXuIDT9F9BKxElAHf /XUIbWxB9ktxR5PcAbdvr15sAbEgsZUR1CndWIqlXE7tmSQLpHtn0xskdw5ah2KU3xfbOwCTe VLhYICHqvqRQllnYbDz/V5TPWQuWXZ5wfQiFAG12XbvNldsq+vPMwJv2Rh3kHIeKIFXjk7zz/ cA58qYyws2utO4DcFTBmSw9VZRgtewE/RhGGeOmq0CwNpEbL4hc3NshwNnLUkaHGzqZO+gI8D Ve3cflyZyAG3a1MkUzKIyyi1g2Hq6c4hySJETNku/kDU00qkMIBV Xref: news.gmane.org gmane.linux.lib.musl.general:12860 Archived-At: > So seems like the main difference is just that on Ubuntu the first entry doesn't have a name Yes, I mistakenly thought it wasn't reported for some reason, but they just don't have a name. > Which seems to suggest that users should just unconditionally skip the first entry if they aren't interested in the program name. > Does that sound right? It sounds right. But the question now is what should libwhich do. Ignore first entry on musl too or start to report first entry on glibc. (first entry being the program itself). As libwhich is used to determine what are the dependencies of a program I don't think it's really necessary to point out that it depends on itself. But it doesn't do any harm either... And could simplify code (also taking away the special handle for Apple systems). Either way it should be consistent across systems. Nice work! Let us know what you choose.