From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17358 invoked by alias); 24 Oct 2014 02:21:29 -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 17267 invoked by uid 89); 24 Oct 2014 02:21:05 -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 02:21:04 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9O2L3dL006416 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 23 Oct 2014 22:21:03 -0400 Received: from [10.3.113.10] ([10.3.113.10]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9O2L2Bk027230; Thu, 23 Oct 2014 22:21:03 -0400 Message-ID: <5449B78E.1060407@redhat.com> Date: Fri, 24 Oct 2014 02:21: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 , libc-alpha@sourceware.org CC: gdb-patches@sourceware.org Subject: Re: [libc patch] __tls_get_addr with link_map * instead of modid References: <20141018201540.GA26252@host2.jankratochvil.net> In-Reply-To: <20141018201540.GA26252@host2.jankratochvil.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-SW-Source: 2014-10/txt/msg00621.txt.bz2 On 10/18/2014 04:15 PM, Jan Kratochvil wrote: > Other option suggested by Tom Tromey is implemented by this patch: > > * A new glibc function like __tls_get_addr that takes a link_map address > rather than a module id. I do not think this is a good solution. If you use this function in jit'd code, you've now deviated from what normal TLS-accessing sequences look like. Now your code deviates from the published tls.pdf in the call sequence, and is undocumented, though simple. On top of that it's a stop-gap measure until we fix things correctly. Because of these things I object to adding this function to ld's API. I don't like libthread_db either, but it avoids us having to put a stop-gap API in ld. I say stop-gap because the real solution is going to be to use python/DWARF, not any API in ld. I'm in favour of exactly 3 things: * New function in libthread_db. * Heuristics in gdb if libthread_db is not new enough. * A python or DWARF based parser to replace libthread_db. Cheers, Carlos.