This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] killing remaining USE___THREAD use


If you go that route you have to apply this patch, though I have no idea
why this code may be needed.

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

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]