From patchwork Mon May 12 17:19:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle McMartin X-Patchwork-Id: 29984 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 48E10238EB for ; Mon, 12 May 2014 17:20:00 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id ih12sf21504427qab.4 for ; Mon, 12 May 2014 10:19:59 -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:mime-version :user-agent:x-original-sender:x-original-authentication-results :content-type:content-disposition; bh=C0QuBM5XzTDd85I7vGUVrVNKRj8N2rj54np3yMFvbi0=; b=QQEalSoHiQHuhmXFVSvPq4FkqHEqYkECw6GKcW9PVVnKH4BmBEkzvscdn6umVeMWYy ZA9ky8+nnp2wUpyObvXYK3+fbWlpdhGD526dcCF/22xFWrRBc1ugBRy5+jjtoT1WJpSm l+Osws8NaMgDlwKVUG3DEM/k4JTd7O7JW+l0BNum+kTiUSWmUxPnMVCZZldzYYJzTd3i bBh0huFEVh3PRVLGr8k37P+bea7UXmsUC3+O9oZBHobI81bNFsep62E9hZTmLtOYtZZr vCVftcYVKqp9Jb2VRHYW4w5se62R1vLwkBL2vmVkwJG5YuxMPH+tMntuI2YZl0+IifNY 3fag== X-Gm-Message-State: ALoCoQlp+jax0r+xoLQk/SWNxa3J9vqVd8+KX8nx85za2tMYhZmlIWO8pDQtyL4WQck8wDq9sXt0 X-Received: by 10.236.138.113 with SMTP id z77mr12173203yhi.25.1399915199725; Mon, 12 May 2014 10:19:59 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.81.115 with SMTP id e106ls1472671qgd.65.gmail; Mon, 12 May 2014 10:19:59 -0700 (PDT) X-Received: by 10.52.156.39 with SMTP id wb7mr25204vdb.97.1399915199496; Mon, 12 May 2014 10:19:59 -0700 (PDT) Received: from mail-vc0-x22c.google.com (mail-vc0-x22c.google.com [2607:f8b0:400c:c03::22c]) by mx.google.com with ESMTPS id r7si2176769vcn.79.2014.05.12.10.19.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 May 2014 10:19:59 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::22c as permitted sender) client-ip=2607:f8b0:400c:c03::22c; Received: by mail-vc0-f172.google.com with SMTP id hr9so9322858vcb.3 for ; Mon, 12 May 2014 10:19:59 -0700 (PDT) X-Received: by 10.58.116.175 with SMTP id jx15mr24285387veb.9.1399915199425; Mon, 12 May 2014 10:19:59 -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 ib8csp86330vcb; Mon, 12 May 2014 10:19:59 -0700 (PDT) X-Received: by 10.66.141.197 with SMTP id rq5mr58297572pab.64.1399915198744; Mon, 12 May 2014 10:19:58 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id eq11si10630041pad.149.2014.05.12.10.19.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 May 2014 10:19:58 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-return-83702-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 14419 invoked by alias); 12 May 2014 17:19:25 -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: binutils-owner@sourceware.org Delivered-To: mailing list binutils@sourceware.org Received: (qmail 14333 invoked by uid 89); 12 May 2014 17:19:24 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 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 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 May 2014 17:19:23 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4CHJMxp015071 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 12 May 2014 13:19:22 -0400 Received: from redacted.bos.redhat.com ([10.18.17.143]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s4CHJKuI032397 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO) for ; Mon, 12 May 2014 13:19:21 -0400 Date: Mon, 12 May 2014 13:19:20 -0400 From: Kyle McMartin To: binutils@sourceware.org Subject: [PATCH][ARM] set DF_STATIC_TLS when emitting IE relocs Message-ID: <20140512171919.GB21081@redacted.bos.redhat.com> MIME-Version: 1.0 User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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::22c 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 Similarly to the AArch64 patch, set DF_STATIC_TLS for consistency with other architectures when we emit IE relocs in a shared library. 2014-05-12 Kyle McMartin * elf32-arm.c (elf32_arm_check_relocs): Set DF_STATIC_TLS when emitting initial-exec relocs when not linking an executable. --- bfd/elf32-arm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 526d4f8..d5dcc83 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -12705,6 +12705,9 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, default: tls_type = GOT_NORMAL; break; } + if (!info->executable && (tls_type & GOT_TLS_IE)) + info->flags |= DF_STATIC_TLS; + if (h != NULL) { h->got.refcount++;