* csu/libc-start.c (LIBC_START_MAIN) [__GNU__]: Do not call
__libc_setup_tls.
* sysdeps/mach/hurd/i386/init-first.c (init): Call __libc_setup_tls.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg2.25-tls.diff
/* Perform IREL{,A} relocations. */
ARCH_SETUP_IREL ();
+#ifndef __GNU__
/* The stack guard goes into the TCB, so initialize it early. */
__libc_setup_tls ();
+#endif
/* In some architectures, IREL{,A} relocations happen after TLS setup in
order to let IFUNC resolvers benefit from TCB information, e.g. powerpc's
assert (d->phdrsz % sizeof (ElfW(Phdr)) == 0);
}
- /* We need to setup TLS before starting sigthread */
+ /* We need to setup TLS before starting sigthread and set stack guard. */
+ __libc_setup_tls ();
extern void __pthread_initialize_minimal(void);
if (__pthread_initialize_minimal != NULL)
__pthread_initialize_minimal();