From patchwork Fri May 23 15:16:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 30809 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 994742066E for ; Fri, 23 May 2014 15:17:09 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id lc6sf17022322vcb.11 for ; Fri, 23 May 2014 08:17:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:subject:date :message-id:x-original-sender:x-original-authentication-results; bh=E8P92uBhEu9nueKhk+RBc7SpBygK7RNPJ5DfJ5J3oe4=; b=j/uqvbLy07rX+PxNTptmZnXWvD9XZfNpzfHIdzBcPJP6+MEsbQBzjkhuqkTWe/Tkop zqSSEpIGJht4YyiOAblohgHk6Q0FVQtNWsbuYG+RACsBN3ER0Wp9Ta3/Mdqs5LRhUxAm 4sAeHi9Sj7ModxezrAGZJLqFetpNFNlXjCl2UxgVvA6XQMtn2Vz6OLc9e8tsOrqK+D19 RSDH0AaufTn2hDcH1c9G9tXE3u5tUtKC3Ms2wFXPbrKw46xfL8SXeN9s9iG83Ul3pmnd Q6jqJRdUXSkMfZPIbtP9q8Ryul3jB74oSubDXG8vaKfbisPpzc+n+Ol0lVh1qZpmHb9W S/pw== X-Gm-Message-State: ALoCoQnMqIDlx57mv5UvAui8rQCO11n19+uFEbruq08R4OT0PPRk3VablwUIAcrU5gSVx6ZDHTgK X-Received: by 10.236.167.138 with SMTP id i10mr747311yhl.57.1400858229404; Fri, 23 May 2014 08:17:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.108.4 with SMTP id i4ls1688949qgf.78.gmail; Fri, 23 May 2014 08:17:09 -0700 (PDT) X-Received: by 10.58.161.101 with SMTP id xr5mr2014212veb.36.1400858229287; Fri, 23 May 2014 08:17:09 -0700 (PDT) Received: from mail-vc0-x233.google.com (mail-vc0-x233.google.com [2607:f8b0:400c:c03::233]) by mx.google.com with ESMTPS id jq7si1819681vec.22.2014.05.23.08.17.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 08:17:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::233 as permitted sender) client-ip=2607:f8b0:400c:c03::233; Received: by mail-vc0-f179.google.com with SMTP id im17so6435967vcb.10 for ; Fri, 23 May 2014 08:17:09 -0700 (PDT) X-Received: by 10.221.26.10 with SMTP id rk10mr4890615vcb.0.1400858229208; Fri, 23 May 2014 08:17:09 -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 ib8csp39914vcb; Fri, 23 May 2014 08:17:08 -0700 (PDT) X-Received: by 10.66.164.135 with SMTP id yq7mr6891399pab.126.1400858228346; Fri, 23 May 2014 08:17:08 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id wh5si4323328pbc.30.2014.05.23.08.17.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 May 2014 08:17:08 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-return-83813-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 12149 invoked by alias); 23 May 2014 15:16:52 -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 12137 invoked by uid 89); 23 May 2014 15:16:51 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f175.google.com Received: from mail-wi0-f175.google.com (HELO mail-wi0-f175.google.com) (209.85.212.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 23 May 2014 15:16:50 +0000 Received: by mail-wi0-f175.google.com with SMTP id f8so1011054wiw.14 for ; Fri, 23 May 2014 08:16:47 -0700 (PDT) X-Received: by 10.180.210.170 with SMTP id mv10mr3827579wic.27.1400858207445; Fri, 23 May 2014 08:16:47 -0700 (PDT) Received: from localhost.localdomain (cpc6-seac21-2-0-cust453.7-2.cable.virginm.net. [82.1.113.198]) by mx.google.com with ESMTPSA id be6sm4238768wjb.41.2014.05.23.08.16.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 May 2014 08:16:46 -0700 (PDT) From: Will Newton To: binutils@sourceware.org Subject: [PATCH] bfd/elfnn-aarch64.c: Cleanup a couple of TLS functions Date: Fri, 23 May 2014 16:16:42 +0100 Message-Id: <1400858202-4459-1-git-send-email-will.newton@linaro.org> X-IsSubscribed: yes X-Original-Sender: will.newton@linaro.org 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::233 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 Add an assert and remove an unused line of code. bfd/ChangeLog: 2014-05-21 Will Newton * elfnn-aarch64.c (tpoff_base): Make test of tls_sec being non-NULL into an assert. (elfNN_aarch64_tls_relax): Remove unused code. --- bfd/elfnn-aarch64.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 498b7bd..d917c7e 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -3301,8 +3301,7 @@ tpoff_base (struct bfd_link_info *info) struct elf_link_hash_table *htab = elf_hash_table (info); /* If tls_sec is NULL, we should have signalled an error already. */ - if (htab->tls_sec == NULL) - return 0; + BFD_ASSERT (htab->tls_sec != NULL); bfd_vma base = align_power ((bfd_vma) TCB_SIZE, htab->tls_sec->alignment_power); @@ -3938,7 +3937,6 @@ elfNN_aarch64_tls_relax (struct elf_aarch64_link_hash_table *globals, or adrp x0, :tlsdesc:var => adrp x0, :gottprel:var */ - insn = bfd_getl32 (contents + rel->r_offset); return bfd_reloc_continue; }