svn commit: r237395 - stable/9/lib/libc/gen

看板FB_svn作者時間13年前 (2012/06/22 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
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); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
文章代碼(AID): #1Fus5VtH (FB_svn)