[patch] Fix TLS access for -static -pthread

Tom Tromey tromey@redhat.com
Tue May 20 15:10:00 GMT 2014


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> I have posted:
Jan> 	TLS variables access for -static -lpthread executables
Jan> 	https://sourceware.org/ml/libc-help/2014-03/msg00024.html
Jan> and the GDB patch below has been confirmed as OK for current glibcs.

Jan> +	  /* GNU __libc_setup_tls initializes l_tls_modid as 1.  */
Jan> +	  err = info->td_thr_tlsbase_p (&thread_info->private->th,
Jan> +					1, &address);

This bit of code (and another like it later on) should have a longer
comment, probably at least including the link above, but also some text
about how this is a hack but why it is ok.

Otherwise this is ok.

Tom



More information about the Gdb-patches mailing list