From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 687 invoked by alias); 1 Sep 2011 07:15:41 -0000 Received: (qmail 673 invoked by uid 22791); 1 Sep 2011 07:15:40 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-yw0-f47.google.com (HELO mail-yw0-f47.google.com) (209.85.213.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Sep 2011 07:15:24 +0000 Received: by ywa12 with SMTP id 12so1253900ywa.20 for ; Thu, 01 Sep 2011 00:15:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.178.68 with SMTP id e44mr6957984yhm.131.1314861323441; Thu, 01 Sep 2011 00:15:23 -0700 (PDT) Received: by 10.236.102.137 with HTTP; Thu, 1 Sep 2011 00:15:23 -0700 (PDT) In-Reply-To: References: Date: Thu, 01 Sep 2011 07:15:00 -0000 Message-ID: Subject: Re: TLS, gcc optimizations, and PIC on x86 From: Kevin Klues To: Ian Lance Taylor Cc: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-09/txt/msg00006.txt.bz2 Fair enough. My current solution is adequate for our purposes, as (like you said) this isn't a very common operation to perform.... That said, do you see any obvious issues with my solution? It seems to work for all of the test cases I've thrown at it, but I could be missing something. Additionally, do you have any suggestions for a better method that achieves similar results? Ideally I'd like a solution that didn't require the use of the 'optimize' attribute as (unfortunately) some of the systems on which we'd like to compile our code still use gcc < 4.4. Kevin On Wed, Aug 31, 2011 at 10:00 PM, Ian Lance Taylor wrote: > Kevin Klues writes: > >> Specifically, I want to be able to change the value of my TLS >> descriptor as well as access TLS variables from that new descriptor >> within the body of a single function. > > As you've discovered, gcc does not support that. =A0It seems like a highly > unusual feature to want. =A0It would not be hard to change gcc to add an > option to support this, but I'm not sure it's worth the ongoing > maintenance cost. > > Ian >