From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3148 invoked by alias); 25 Oct 2014 06:26:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 3126 invoked by uid 89); 25 Oct 2014 06:26:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,RDNS_DYNAMIC,TVD_RCVD_IP autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: brightrain.aerifal.cx Received: from 216-12-86-13.cv.mvl.ntelos.net (HELO brightrain.aerifal.cx) (216.12.86.13) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 25 Oct 2014 06:26:36 +0000 Received: from dalias by brightrain.aerifal.cx with local (Exim 3.15 #2) id 1Xhuo4-0004av-00; Sat, 25 Oct 2014 06:26:32 +0000 Date: Sat, 25 Oct 2014 06:26:00 -0000 From: Rich Felker To: Jan Kratochvil Cc: Carlos O'Donell , libc-alpha@sourceware.org, gdb-patches@sourceware.org Subject: Re: [libc patch] __tls_get_addr with link_map * instead of modid Message-ID: <20141025062632.GK22465@brightrain.aerifal.cx> References: <20141018201540.GA26252@host2.jankratochvil.net> <5449B78E.1060407@redhat.com> <20141024093834.GA24090@host2.jankratochvil.net> <544A60A5.4020701@redhat.com> <20141024144014.GA2193@host2.jankratochvil.net> <20141025055516.GJ22465@brightrain.aerifal.cx> <20141025061400.GA32108@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141025061400.GA32108@host2.jankratochvil.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-10/txt/msg00693.txt.bz2 On Sat, Oct 25, 2014 at 08:14:00AM +0200, Jan Kratochvil wrote: > On Sat, 25 Oct 2014 07:55:16 +0200, Rich Felker wrote: > > On Fri, Oct 24, 2014 at 04:40:14PM +0200, Jan Kratochvil wrote: > > > I forgot about this possibility - that libthread_db would provide just the > > > module ID (and not some per-thread address). > > > > Why not just use dl_iterate_phdr to get the module id? > > I do not see where to find l_tls_modid in the returned data structures. > > dl_iterate_phdr is in libc.so.6 (and not libdl.so.2) so that would be OK. Oh, it looks like it's only available in the BSD version of on the dl_phdr_info structure. Could we get it added to glibc? See: http://www.freebsd.org/cgi/man.cgi?query=dl_iterate_phdr&sektion=3&apropos=0&manpath=FreeBSD%2B10.0-RELEASE This is the version of the structure I accepted for inclusion in musl, and I don't think I was even aware that glibc lacked these fields. Rich