|
Message-ID: <20180528200243.GH1392@brightrain.aerifal.cx> Date: Mon, 28 May 2018 16:02:43 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: dl_iterate_phdr() behaves differently on musl and glibc On Mon, May 28, 2018 at 03:44:15PM +0200, Bob B. wrote: > Hi list. > > I noticed a difference in behavior of dl_iterate_phdr() when playing with musl and glibc. > The program I tried was the example on the bottom of the page: https://linux.die.net/man/3/dl_iterate_phdr > > What happens is that musl returns the program itself when run + shared objects. > glibc only returns the shared objects. > > Not sure which one is right. Or if both are acceptable. > Any light to clear why the different behavior is appreciated. I was unaware of that difference, but omitting the main program seems like a serious limitation that makes the interface a lot less useful. I'm not sure if there's any other way to get the information. The manual page documents the function as enumerating the "shared objects", which one could interpret only as libraries, but I usually consider a dynamic program as a "shared object" itself. Is there a reason musl's behavior is problematic here? Even without the ambiguity I'd be hesitant to change it since programs may be relying on it. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.