On Tue, 20 May 2014 17:10:03 +0200, Tom Tromey wrote: > 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. I have put there: + /* This code path handles the case of -static -pthread executables: + https://sourceware.org/ml/libc-help/2014-03/msg00024.html + For older GNU libc r_debug.r_map is NULL. For GNU libc after + PR libc/16831 due to GDB PR threads/16954 LOAD_MODULE is also NULL. + The constant number 1 depends on GNU __libc_setup_tls + initialization of l_tls_modid to 1. */ > Otherwise this is ok. Reposting with the comment update. Jan