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=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17296 invoked from network); 18 Jan 2023 16:04:12 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 18 Jan 2023 16:04:12 -0000 Received: (qmail 17613 invoked by uid 550); 18 Jan 2023 16:04:09 -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 17539 invoked from network); 18 Jan 2023 16:04:08 -0000 Date: Wed, 18 Jan 2023 11:03:52 -0500 From: Rich Felker To: Hauke Mehrtens Cc: musl@lists.openwall.com, d.dorau@avm.de, Hauke Mehrtens Message-ID: <20230118160352.GH4163@brightrain.aerifal.cx> References: <20211215152048.GJ7074@brightrain.aerifal.cx> <20220109051408.GQ7074@brightrain.aerifal.cx> <0a67d948-d348-94f7-9cac-cc81a052f76e@hauke-m.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0a67d948-d348-94f7-9cac-cc81a052f76e@hauke-m.de> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] Tracking shared libraries in GDB not working? On Wed, Jan 18, 2023 at 12:14:28AM +0100, Hauke Mehrtens wrote: > On 1/10/23 21:02, Hauke Mehrtens wrote: > >On 1/9/22 06:14, Rich Felker wrote: > >>On Mon, Dec 20, 2021 at 09:54:40AM +0100, d.dorau@avm.de wrote: > >>>Thanks for your thoughts. I used them to search for further > >>>information and found > >>>the missing piece: > >>> > >>>https://lists.yoctoproject.org/g/yocto/message/48584 > >>> > >>>I applied that first patch > >>>https://lists.yoctoproject.org/g/yocto/attachment/48584/0/0007-Teach-dynlink.c-about-DT_MIPS_RLD_MAP_REL.patch > >>> > >>>and apparently it seems to solve the issue. :-) > >>> > >>>I did a search on this mailing list and couldn't find this > >>>patch mentioned here. > >>>Maybe you can include this patch in a future release if you > >>>think the solution is correct. > >> > >>Thanks! This patch is not correct as-is, because the value of > >>DT_MIPS_RLD_MAP_REL is only meaningful on mips and could be reused on > >>other archs. But I've whipped up what I think is a correct version of > >>it here (attached), using the same approach as used for > >>DT_MIPS_RLD_MAP already. If you get a chance, please let me know if it > >>works. > >> > >>Rich > >Hi Rich, > > > >I tried your attached patch on a mips32 be system and it worked. > >With this patch gdb was able to find the shared libraries which > >were loaded with dlopen(). I tested this on OpenWrt 19.07 with > >musl 1.1.24 and gdb 8.3.1 using gdbserver. > > > >It would be nice if you could add it to upstream musl libc. > > > >Hauke > Hi, > > This is also working fine for me with recent OpenWrt master using > musl 1.2.3, gcc 12.2 and gdb 12.1. Thanks for the data points and for bumping this. I'll go ahead and apply it. Rich