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: 875 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx23.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id C13EC36007A for ; Mon, 12 May 2014 10:47:53 -0700 (PDT) Received: by homiemail-mx23.g.dreamhost.com (Postfix, from userid 14307373) id 6BEA063BB0D24; Mon, 12 May 2014 10:47:53 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx23.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx23.g.dreamhost.com (Postfix) with ESMTPS id 49AAF63BB0D05 for ; Mon, 12 May 2014 10:47:53 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=yrLev8bgINTKm0S6jaSjVuIMuoCfI LCyit7HMS75BPqaWoesPSC0WLCG4lhjBKvCDwnRWqXcx6Ucwp962EyIMQv+q8Xh0 LQH5SisTqvZwZcuOQjzB2PNq5k9/cf+Ic6lXrCF8hjRf0WU5d2p3T8LsURPECnre rrdSKr2wHbJhww= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=5ejIj3+17knDsO43tVsn1fvktVo=; b=U69 IIOzaXljey8xW4r1eqd5OkRmgEjk0oe+z98GBvpK5Uzv1blFaLMe9UxFwyTam2ed rK4w1gkgnLqPpWmSHcmIf/wVH6tRqY3KD7rn+6j2Vs7GBDITykg6eSnzhqUvCt8p bHZkiLZ9UFK1U3OMlWE6KQty7zifrzKcxZCmn0I4= Received: (qmail 22598 invoked by alias); 12 May 2014 17:47:51 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk 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 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 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 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-DH-Original-To: glibc@patchwork.siddhesh.in 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. */