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: 348088 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id 7E535140086 for ; Tue, 13 May 2014 03:47:56 +1000 (EST) 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=TfPM/Z8YKE1hKCE9lzgYRS99y2tDS f3X3cb0FA5MQ139AlaE1flEKInCyycERCIFNDBN/jbIB4kpbCHk5ZUk0eTY29KJG sIGKEaM+Ps8oHoZOfcLESne1UnqZ1t1FR76bUHX/hRPxkmmb9GgectlinH6JMYUP H+kCiSpQqdyOlU= 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=DzZ qFr/C6FLLjJVPu/5CknulBTPZTHtZ/VuLQ+C3pU3jebuy1DRr6a1+Ec1+CfKrs6T aAXC1dUX97ghz9D/VAXTdDfk0lHf2w6oBwcRmF88JCFwaayvSyUWG1U4sMFBo+vc fW/AeKwHm595Dwi6sQZIu/6bT66NfQkcbaVYw2co= 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) 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. */