summaryrefslogtreecommitdiff
path: root/libc/csu
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2009-07-30 22:27:48 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2009-07-30 22:27:48 +0000
commit42296946a6ccf1c1d88abf77ff1cb2b1935a4a7c (patch)
tree1a9b6a848a4558bafe75c66cbc1dc221e25f1a63 /libc/csu
parent9256f6cec752328b02be5ad239c6f9abb37e431d (diff)
Merge changes between r8721 and r8731 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@8732 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/csu')
-rw-r--r--libc/csu/libc-tls.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libc/csu/libc-tls.c b/libc/csu/libc-tls.c
index 0d240ccef..5a4994286 100644
--- a/libc/csu/libc-tls.c
+++ b/libc/csu/libc-tls.c
@@ -1,5 +1,5 @@
/* Initialization code for TLS in statically linked application.
- Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002-2006, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -99,6 +99,9 @@ init_static_tls (size_t memsz, size_t align)
surplus that permits dynamic loading of modules with IE-model TLS. */
GL(dl_tls_static_size) = roundup (memsz + GL(dl_tls_static_size),
TLS_TCB_ALIGN);
+#if TLS_TCB_AT_TP
+ GL(dl_tls_static_size) += TLS_TCB_SIZE;
+#endif
GL(dl_tls_static_used) = memsz;
/* The alignment requirement for the static TLS block. */
GL(dl_tls_static_align) = align;
@@ -211,9 +214,7 @@ __libc_setup_tls (size_t tcbsize, size_t tcbalign)
memsz = roundup (memsz, align ?: 1);
-#if TLS_TCB_AT_TP
- memsz += tcbsize;
-#elif TLS_DTV_AT_TP
+#if TLS_DTV_AT_TP
memsz += tcb_offset;
#endif