From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6418 invoked by alias); 24 Oct 2014 15:00:00 -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 6398 invoked by uid 89); 24 Oct 2014 14:59:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 24 Oct 2014 14:59:58 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9OExuAa020939 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 24 Oct 2014 10:59:56 -0400 Received: from [10.3.113.10] ([10.3.113.10]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9OExtrw003222; Fri, 24 Oct 2014 10:59:55 -0400 Message-ID: <544A696B.5040101@redhat.com> Date: Fri, 24 Oct 2014 15:00:00 -0000 From: "Carlos O'Donell" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: Jan Kratochvil CC: libc-alpha@sourceware.org, gdb-patches@sourceware.org Subject: Re: [libc patch] __tls_get_addr with link_map * instead of modid References: <20141018201540.GA26252@host2.jankratochvil.net> <5449B78E.1060407@redhat.com> <20141024093834.GA24090@host2.jankratochvil.net> <544A60A5.4020701@redhat.com> <20141024144014.GA2193@host2.jankratochvil.net> In-Reply-To: <20141024144014.GA2193@host2.jankratochvil.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-10/txt/msg00645.txt.bz2 On 10/24/2014 10:40 AM, Jan Kratochvil wrote: > On Fri, 24 Oct 2014 16:22:29 +0200, Carlos O'Donell wrote: >> What's wrong with using libthread_db to get the module ID and then you can >> call the normal TLS functions > + >> Isn't a solution to use libthread_db to get the module ID from the link_map, >> then use that with normal __tls_get_addr instead of adding to ld's API? > > I forgot about this possibility - that libthread_db would provide just the > module ID (and not some per-thread address). > > Therefore going to post a libthread_db patch later, instead of using > _dl_tls_get_addr_soft() which would have one disadvantage I described before > to Alex. That sounds good to me. If you remember I promised you that I'd implement this, but I haven't gotten to it yet. If you want to implement it, please go ahead, otherwise I'll get to adding the function to libthread_db and testing. Right now though I'm handling other deeper issues (dlopen recursion). So any help you're willing to give is appreciated. I'm happy to review patches. >> What I oppose is the addition to ld's ABI and API something which is not going >> to be a permanent solution, and for which we can put a function somewhere >> else and get similar results. > > IMO the dlopen() way could be the first simple solution, extending it > optionally only upon demand later. Going now back to dlopen() seems a bit > backwards to me. I don't judge you. That is a decision the gdb community has to make. It sounds like you've made it. I'm here to help :-) Cheers, Carlos.