From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22083 invoked by alias); 6 Aug 2008 11:16:27 -0000 Received: (qmail 22075 invoked by uid 22791); 6 Aug 2008 11:16:26 -0000 X-Spam-Check-By: sourceware.org Received: from e36.co.us.ibm.com (HELO e36.co.us.ibm.com) (32.97.110.154) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 06 Aug 2008 11:15:43 +0000 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e36.co.us.ibm.com (8.13.8/8.13.8) with ESMTP id m76BFeqE006336 for ; Wed, 6 Aug 2008 07:15:40 -0400 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.0) with ESMTP id m76BFeU7171050 for ; Wed, 6 Aug 2008 05:15:40 -0600 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m76BFdAO024661 for ; Wed, 6 Aug 2008 05:15:40 -0600 Received: from [9.124.31.22] ([9.124.31.22]) by d03av03.boulder.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id m76BFaY1024530; Wed, 6 Aug 2008 05:15:37 -0600 Subject: Re: [patch] Re: Accessing tls variables across files causes a bug From: Vinay Sridhar To: Daniel Jacobowitz Cc: Jan Kratochvil , gdb-patches@sources.redhat.com, luisgpm@linux.vnet.ibm.com, uweigand@de.ibm.com In-Reply-To: <20080805122118.GB17219@caradoc.them.org> References: <1217480020.4755.1.camel@vinaysridhar.in.ibm.com> <20080802171807.GA2755@host0.dyn.jankratochvil.net> <1217925527.3658.41.camel@vinaysridhar.in.ibm.com> <20080805122118.GB17219@caradoc.them.org> Content-Type: text/plain Date: Wed, 06 Aug 2008 11:16:00 -0000 Message-Id: <1218021410.13466.4.camel@vinaysridhar.in.ibm.com> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1 (2.22.1-2.fc9) Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2008-08/txt/msg00105.txt.bz2 On Tue, 2008-08-05 at 08:21 -0400, Daniel Jacobowitz wrote: > On Tue, Aug 05, 2008 at 02:08:47PM +0530, Vinay Sridhar wrote: > > 2. obtain symbol info from msymtab and check for the section value. > > AFAIK, elf has section=17 for tls. > > This number doesn't mean anything. You want the STT_TLS section type. > But if you're doing the right thing without a minimal symbol why rely > on a minimal symbol at all? > We need to determine that the variable is a "tls" variable. When this is extern, the symbol is LOC_UNRESOLVED. So the section type from "sym" is not filled. Thats why I tried to determine this from the minimal symbol. If there is any other method of determining a variable is "tls" before its owning symtab is linked in, could you please inform? I used this section number as I could not find another way of determining this..