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: Wed, 21 May 2014 08:14:09 -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> <87d2f8trjo dot fsf at fleche dot redhat dot com> <20140521121734 dot GA14288 at host2 dot jankratochvil dot net>
Tom> This bit of code (and another like it later on) should have a longer
Tom> comment, probably at least including the link above, but also some text
Tom> about how this is a hack but why it is ok.
Jan> I have put there:
Jan> + /* This code path handles the case of -static -pthread executables:
Jan> + https://sourceware.org/ml/libc-help/2014-03/msg00024.html
Jan> + For older GNU libc r_debug.r_map is NULL. For GNU libc after
Jan> + PR libc/16831 due to GDB PR threads/16954 LOAD_MODULE is also NULL.
Jan> + The constant number 1 depends on GNU __libc_setup_tls
Jan> + initialization of l_tls_modid to 1. */
Thanks, that looks good.
Tom