From patchwork Wed May 14 20:54:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle McMartin X-Patchwork-Id: 30199 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CC1AE2055D for ; Wed, 14 May 2014 20:55:02 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id ey11sf623355pad.8 for ; Wed, 14 May 2014 13:55:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mailing-list:precedence:list-id :list-unsubscribe:list-subscribe:list-archive:list-post:list-help :sender:delivered-to:date:from:to:subject:message-id:references :mime-version:in-reply-to:user-agent:x-original-sender :x-original-authentication-results:content-type:content-disposition; bh=3L3iIzJ62lk6Mh5TwIdfP4OH0l4mDzeE9VsT4Co+BNk=; b=PUjjecfUTWWIxc1DoOn+yxtgz/EDSj//sXO3vi5SIaUqK/Aa+cE5O2ORTk/99fE13a JRyf9fKSu/0bLz6KROgqM19mH2FKrf8M1ohkfZklS3CuWRp+Yi+hg7goNMdflJaqqboA zMtSQMSKAAO83KJQPEVN22h0ackW05vHQQl80jfEIJlH/I/pPu6b669WPxrRvSTh6NAs w2coLNLUf9hPaA7L/DYEVxt/F9HmUDvoGAUmW9DkSboeZeTuJe7wTgV+oGTUQL8eNTdz Qh7lFVuXfs9eFmggRXMQ/ABIYkH2x4WbgetYZNwdxcrgYLOEfhKTtC3pc8Yc0pornP/l vbWA== X-Gm-Message-State: ALoCoQkfcZZBqi2E8OwrFkGfTj3SCjVMC2LieRLk1/xS4ctJZi6XhKPos4N6C3cq0ALIaHOH9Jjj X-Received: by 10.66.169.231 with SMTP id ah7mr3092166pac.40.1400100902117; Wed, 14 May 2014 13:55:02 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.47.82 with SMTP id l76ls2734934qga.61.gmail; Wed, 14 May 2014 13:55:02 -0700 (PDT) X-Received: by 10.52.164.237 with SMTP id yt13mr4017335vdb.18.1400100901999; Wed, 14 May 2014 13:55:01 -0700 (PDT) Received: from mail-vc0-x22e.google.com (mail-vc0-x22e.google.com [2607:f8b0:400c:c03::22e]) by mx.google.com with ESMTPS id at8si531891vec.37.2014.05.14.13.55.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 May 2014 13:55:01 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::22e as permitted sender) client-ip=2607:f8b0:400c:c03::22e; Received: by mail-vc0-f174.google.com with SMTP id lh14so3202202vcb.19 for ; Wed, 14 May 2014 13:55:01 -0700 (PDT) X-Received: by 10.220.103.141 with SMTP id k13mr4647784vco.25.1400100901910; Wed, 14 May 2014 13:55:01 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp270772vcb; Wed, 14 May 2014 13:55:01 -0700 (PDT) X-Received: by 10.66.139.38 with SMTP id qv6mr7133155pab.123.1400100901012; Wed, 14 May 2014 13:55:01 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id hd5si3027390pac.234.2014.05.14.13.55.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 May 2014 13:55:01 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-49837-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 31013 invoked by alias); 14 May 2014 20:54:53 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list List-Id: List-Unsubscribe: , List-Subscribe: List-Archive: List-Post: , List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 30998 invoked by uid 89); 14 May 2014 20:54:52 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Date: Wed, 14 May 2014 16:54:48 -0400 From: Kyle McMartin To: libc-alpha@sourceware.org Subject: Re: [PATCH] fix static TLS consumption by TLS descriptors Message-ID: <20140514205448.GL26038@redacted.bos.redhat.com> References: <20140514203250.GK26038@redacted.bos.redhat.com> MIME-Version: 1.0 In-Reply-To: <20140514203250.GK26038@redacted.bos.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Original-Sender: kmcmarti@redhat.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::22e as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 Content-Disposition: inline On Wed, May 14, 2014 at 04:32:51PM -0400, Kyle McMartin wrote: > rth points out something more sensible than the if (0) ugliness which I like better. Thanks! --- a/sysdeps/aarch64/dl-machine.h +++ b/sysdeps/aarch64/dl-machine.h @@ -295,7 +295,7 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, # ifndef SHARED CHECK_STATIC_TLS (map, sym_map); # else - if (!TRY_STATIC_TLS (map, sym_map)) + if (1) { td->arg = _dl_make_tlsdesc_dynamic (sym_map, sym->st_value + reloc->r_addend); diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 899b256..f55a991 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -458,7 +458,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, # ifndef SHARED CHECK_STATIC_TLS (map, sym_map); # else - if (!TRY_STATIC_TLS (map, sym_map)) + if (1) { td->argument.pointer = _dl_make_tlsdesc_dynamic (sym_map, value); diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h index 368bee2..b6b5802 100644 --- a/sysdeps/i386/dl-machine.h +++ b/sysdeps/i386/dl-machine.h @@ -394,7 +394,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, # ifndef SHARED CHECK_STATIC_TLS (map, sym_map); # else - if (!TRY_STATIC_TLS (map, sym_map)) + if (1) { td->arg = _dl_make_tlsdesc_dynamic (sym_map, sym->st_value + (ElfW(Word))td->arg); diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h index 8df04a9..4ec4340 100644 --- a/sysdeps/x86_64/dl-machine.h +++ b/sysdeps/x86_64/dl-machine.h @@ -359,7 +359,7 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, # ifndef SHARED CHECK_STATIC_TLS (map, sym_map); # else - if (!TRY_STATIC_TLS (map, sym_map)) + if (1) { td->arg = _dl_make_tlsdesc_dynamic (sym_map, sym->st_value + reloc->r_addend);