diff options
Diffstat (limited to 'libc/csu/libc-tls.c')
-rw-r--r-- | libc/csu/libc-tls.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libc/csu/libc-tls.c b/libc/csu/libc-tls.c index b00a5ccb9..6c52262ba 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-2006, 2009 Free Software Foundation, Inc. + Copyright (C) 2002-2012 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 @@ -32,7 +32,7 @@ extern ElfW(Phdr) *_dl_phdr; extern size_t _dl_phnum; -static dtv_t static_dtv[2 + TLS_SLOTINFO_SURPLUS]; +dtv_t _dl_static_dtv[2 + TLS_SLOTINFO_SURPLUS]; static struct @@ -163,33 +163,33 @@ __libc_setup_tls (size_t tcbsize, size_t tcbalign) & ~(max_align - 1)); /* Initialize the dtv. [0] is the length, [1] the generation counter. */ - static_dtv[0].counter = (sizeof (static_dtv) / sizeof (static_dtv[0])) - 2; - // static_dtv[1].counter = 0; would be needed if not already done + _dl_static_dtv[0].counter = (sizeof (_dl_static_dtv) / sizeof (_dl_static_dtv[0])) - 2; + // _dl_static_dtv[1].counter = 0; would be needed if not already done /* Initialize the TLS block. */ #if TLS_TCB_AT_TP - static_dtv[2].pointer.val = ((char *) tlsblock + tcb_offset + _dl_static_dtv[2].pointer.val = ((char *) tlsblock + tcb_offset - roundup (memsz, align ?: 1)); static_map.l_tls_offset = roundup (memsz, align ?: 1); #elif TLS_DTV_AT_TP - static_dtv[2].pointer.val = (char *) tlsblock + tcb_offset; + _dl_static_dtv[2].pointer.val = (char *) tlsblock + tcb_offset; static_map.l_tls_offset = tcb_offset; #else # error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined" #endif - static_dtv[2].pointer.is_static = true; + _dl_static_dtv[2].pointer.is_static = true; /* sbrk gives us zero'd memory, so we don't need to clear the remainder. */ - memcpy (static_dtv[2].pointer.val, initimage, filesz); + memcpy (_dl_static_dtv[2].pointer.val, initimage, filesz); /* Install the pointer to the dtv. */ /* Initialize the thread pointer. */ #if TLS_TCB_AT_TP - INSTALL_DTV ((char *) tlsblock + tcb_offset, static_dtv); + INSTALL_DTV ((char *) tlsblock + tcb_offset, _dl_static_dtv); const char *lossage = TLS_INIT_TP ((char *) tlsblock + tcb_offset, 0); #elif TLS_DTV_AT_TP - INSTALL_DTV (tlsblock, static_dtv); + INSTALL_DTV (tlsblock, _dl_static_dtv); const char *lossage = TLS_INIT_TP (tlsblock, 0); #else # error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined" |