From 3c8ed68000400bb993f4b9cc4efd36cb17c9c6ec Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 12 Jul 2007 15:34:38 +0000 Subject: 2007-06-18 Jakub Jelinek * elf/rtld.c (dl_main): Don't call init_tls more than once. --- elf/rtld.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'elf') diff --git a/elf/rtld.c b/elf/rtld.c index 584d216f70..7bf84e2534 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -1414,6 +1414,12 @@ ld.so does not support TLS, but program uses it!\n"); /* Iterate over all entries in the list. The order is important. */ struct audit_ifaces *last_audit = NULL; struct audit_list *al = audit_list->next; + +#ifdef USE_TLS + /* Since we start using the auditing DSOs right away we need to + initialize the data structures now. */ + tcbp = init_tls (); +#endif do { #ifdef USE_TLS @@ -1424,10 +1430,6 @@ ld.so does not support TLS, but program uses it!\n"); always allocate the static block, we never defer it even if no DF_STATIC_TLS bit is set. The reason is that we know glibc will use the static model. */ - - /* Since we start using the auditing DSOs right away we need to - initialize the data structures now. */ - tcbp = init_tls (); #endif struct dlmopen_args dlmargs; dlmargs.fname = al->name; -- cgit v1.2.3-70-g09d2