[RFC] killing remaining USE___THREAD use
diff mbox

Message ID mvmk3bimsiv.fsf@hawking.suse.de
State New
Headers show

Commit Message

Andreas Schwab March 25, 2014, 11:23 a.m. UTC
If you go that route you have to apply this patch, though I have no idea
why this code may be needed.


Andreas.

Patch
diff mbox

diff --git a/elf/rtld.c b/elf/rtld.c
index 16e7f7a..ba92a2a 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -467,15 +467,16 @@  _dl_start (void *arg)
 
 	/* Initialize the TLS block.  */
 #if TLS_TCB_AT_TP
-	initdtv[2].pointer = tlsblock;
+	initdtv[2].pointer.val = tlsblock;
 #elif TLS_DTV_AT_TP
 	bootstrap_map.l_tls_offset = roundup (TLS_INIT_TCB_SIZE,
 					      bootstrap_map.l_tls_align);
-	initdtv[2].pointer = (char *) tlsblock + bootstrap_map.l_tls_offset;
+	initdtv[2].pointer.val = (char *) tlsblock + bootstrap_map.l_tls_offset;
 #else
 # error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
 #endif
-	p = __mempcpy (initdtv[2].pointer, bootstrap_map.l_tls_initimage,
+	initdtv[2].pointer.is_static = true;
+	p = __mempcpy (initdtv[2].pointer.val, bootstrap_map.l_tls_initimage,
 		       bootstrap_map.l_tls_initimage_size);
 #ifdef HAVE_BUILTIN_MEMSET
 	__builtin_memset (p, '\0', (bootstrap_map.l_tls_blocksize