From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13166 invoked by alias); 12 May 2014 17:19:12 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 13147 invoked by uid 89); 12 May 2014 17:19:10 -0000 Authentication-Results: sourceware.org; auth=none 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:09 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4CHJ8SE021175 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 12 May 2014 13:19:08 -0400 Received: from redacted.bos.redhat.com ([10.18.17.143]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s4CHJ68T010335 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Mon, 12 May 2014 13:19:08 -0400 Date: Mon, 12 May 2014 17:19:00 -0000 From: Kyle McMartin To: binutils@sourceware.org Subject: [PATCH][AARCH64] set DF_STATIC_TLS when emitting IE relocs Message-ID: <20140512171906.GA21081@redacted.bos.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00102.txt.bz2 For consistency with other architectures, set DF_STATIC_TLS in shared libraries which will consume static TLS slots when loaded. 2014-05-12 Kyle McMartin * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Set DF_STATIC_TLS when emitting initial-exec relocs and not linking an executable. --- bfd/elfnn-aarch64.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 498b7bd..229407e 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -5272,6 +5272,9 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, if ((got_type & GOT_TLS_IE) && GOT_TLS_GD_ANY_P (got_type)) got_type &= ~ (GOT_TLSDESC_GD | GOT_TLS_GD); + if (!info->executable && (got_type & GOT_TLS_IE)) + info->flags |= DF_STATIC_TLS; + if (old_got_type != got_type) { if (h != NULL) -- 1.9.0