This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix TLS access for -static -pthread
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 20 May 2014 09:10:03 -0600
- Subject: Re: [patch] Fix TLS access for -static -pthread
- Authentication-results: sourceware.org; auth=none
- References: <20140410115204 dot GB16411 at host2 dot jankratochvil dot net>
>>>>> "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