From owner-svn-src-stable@FreeBSD.ORG Thu Jun 21 13:39:56 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EB6BF1065675; Thu, 21 Jun 2012 13:39:56 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D562A8FC22; Thu, 21 Jun 2012 13:39:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5LDduTO015843; Thu, 21 Jun 2012 13:39:56 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5LDdumX015841; Thu, 21 Jun 2012 13:39:56 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201206211339.q5LDdumX015841@svn.freebsd.org> From: Marius Strobl Date: Thu, 21 Jun 2012 13:39:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237395 - stable/9/lib/libc/gen X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2012 13:39:57 -0000 Author: marius Date: Thu Jun 21 13:39:56 2012 New Revision: 237395 URL: http://svn.freebsd.org/changeset/base/237395 Log: MFC: r232582 (partial) - Switch ARM to TLS Variant I. - Fix TLS allocation for Variant I: both rtld and libc allocators assume that tls_static_space includes space for TLS structure. So increment calculated static size by the size of it. Modified: stable/9/lib/libc/gen/tls.c Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/stdtime/ (props changed) stable/9/lib/libc/sys/ (props changed) stable/9/lib/libc/uuid/ (props changed) Modified: stable/9/lib/libc/gen/tls.c ============================================================================== --- stable/9/lib/libc/gen/tls.c Thu Jun 21 13:01:00 2012 (r237394) +++ stable/9/lib/libc/gen/tls.c Thu Jun 21 13:39:56 2012 (r237395) @@ -66,11 +66,12 @@ void __libc_free_tls(void *tls, size_t t #error TLS_TCB_ALIGN undefined for target architecture #endif -#if defined(__ia64__) || defined(__powerpc__) +#if defined(__arm__) || defined(__ia64__) || \ + defined(__powerpc__) #define TLS_VARIANT_I #endif #if defined(__i386__) || defined(__amd64__) || defined(__sparc64__) || \ - defined(__arm__) || defined(__mips__) + defined(__mips__) #define TLS_VARIANT_II #endif @@ -308,6 +309,13 @@ _init_tls() } } +#ifdef TLS_VARIANT_I + /* + * tls_static_space should include space for TLS structure + */ + tls_static_space += TLS_TCB_SIZE; +#endif + tls = _rtld_allocate_tls(NULL, TLS_TCB_SIZE, TLS_TCB_ALIGN); _set_tp(tls);