From patchwork Mon May 12 17:47:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle McMartin X-Patchwork-Id: 29988 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B1C95238EB for ; Mon, 12 May 2014 17:54:35 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id w7sf24826699qcr.0 for ; Mon, 12 May 2014 10:54:35 -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=wo+z07MqlwPtR7z5qz/fs1pV5nWU/tgZtnET8hNMQfk=; b=Zvvqj6mG6ugkS/5qhZvGQZYSb+yTHYT6a+G+X5hWfg8eurLCN2I3ENujzfEFJxUWch pV+ANFmf0rZDWzAqr1eLRNAajU/FnDU5k925ksSNBh3IkYhDXeQzuldPrNqhP/j+sgoC Rl6+5yLh+S1lcjj+9RQZ1BDHvNFf3aZf19QZ2NTY5ylP7Yz2mflknWgPx5nm3IMGrEe8 CPmiZcy0ooWpPIyhpCzIBFKzXSnSBxcRbzit+LPW7MfkwCvGD3BOOeQ2lYYazkI4bVdK WKwC/0SH5JL+0OHK+s8ZdOla8/SdGDORhQhmk1FVuPMS/yKeYte+3+95lDdozz1ZANQ7 wCmQ== X-Gm-Message-State: ALoCoQm/J15Y+r5hOJqd2wykTYc9DJAGwFN95OGfGTMRRVMH+6zmFwWHrj7wgYntoOHkZx96cgtN X-Received: by 10.236.192.196 with SMTP id i44mr1167577yhn.23.1399917275585; Mon, 12 May 2014 10:54:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.145 with SMTP id g17ls1442510qge.76.gmail; Mon, 12 May 2014 10:54:35 -0700 (PDT) X-Received: by 10.52.15.1 with SMTP id t1mr1717207vdc.49.1399917275496; Mon, 12 May 2014 10:54:35 -0700 (PDT) Received: from mail-ve0-x231.google.com (mail-ve0-x231.google.com [2607:f8b0:400c:c01::231]) by mx.google.com with ESMTPS id sc7si2189778vdc.67.2014.05.12.10.54.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 May 2014 10:54:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c01::231 as permitted sender) client-ip=2607:f8b0:400c:c01::231; Received: by mail-ve0-f177.google.com with SMTP id db11so9115327veb.8 for ; Mon, 12 May 2014 10:54:35 -0700 (PDT) X-Received: by 10.58.123.71 with SMTP id ly7mr24361770veb.11.1399917275328; Mon, 12 May 2014 10:54:35 -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 ib8csp88462vcb; Mon, 12 May 2014 10:54:34 -0700 (PDT) X-Received: by 10.66.136.103 with SMTP id pz7mr58898601pab.140.1399917274669; Mon, 12 May 2014 10:54:34 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id xx4si10711826pab.114.2014.05.12.10.54.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 May 2014 10:54:34 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-49754-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 22598 invoked by alias); 12 May 2014 17:47:51 -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 22588 invoked by uid 89); 12 May 2014 17:47:50 -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 Date: Mon, 12 May 2014 13:47:46 -0400 From: Kyle McMartin To: libc-alpha@sourceware.org Subject: [PATCH][AARCH64] correct alignment of TLS_TCB_ALIGN Message-ID: <20140512174746.GE21081@redacted.bos.redhat.com> MIME-Version: 1.0 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:c01::231 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 This fixes a variety of testsuite failures for me: tststatic.out Error 1 tststatic2.out Error 1 tst-tls9-static.out Error 1 tst-audit8.out Error 127 tst-audit9.out Error 127 tst-audit1.out Error 127 and also has the added benefit of making LD_AUDIT/sotruss work on AArch64. Otherwise, we bail out early in _dl_try_allocate_static_tls as the alignment requirement of the PT_TLS section in libc is 16. 2014-05-12 Kyle McMartin * sysdeps/aarch64/nptl/tls.h: increase TCB alignment to the alignment of struct pthread. --- a/sysdeps/aarch64/nptl/tls.h +++ b/sysdeps/aarch64/nptl/tls.h @@ -63,7 +63,7 @@ typedef struct # define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) /* Alignment requirements for the initial TCB. */ -# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t) +# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) /* This is the size of the TCB. */ # define TLS_TCB_SIZE sizeof (tcbhead_t) @@ -72,7 +72,7 @@ typedef struct # define TLS_PRE_TCB_SIZE sizeof (struct pthread) /* Alignment requirements for the TCB. */ -# define TLS_TCB_ALIGN __alignof__ (tcbhead_t) +# define TLS_TCB_ALIGN __alignof__ (struct pthread) /* Install the dtv pointer. The pointer passed is to the element with index -1 which contain the length. */