From 3c8ed68000400bb993f4b9cc4efd36cb17c9c6ec Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 12 Jul 2007 15:34:38 +0000 Subject: [PATCH] 2007-06-18 Jakub Jelinek * elf/rtld.c (dl_main): Don't call init_tls more than once. --- ChangeLog | 4 ++++ elf/rtld.c | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 67481ed67ab..6e635e6e958 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-06-18 Jakub Jelinek + + * elf/rtld.c (dl_main): Don't call init_tls more than once. + 2007-06-19 Ulrich Drepper * elf/dl-close.c (free_mem): Free _dl_scope_free_list. diff --git a/elf/rtld.c b/elf/rtld.c index 584d216f708..7bf84e2534c 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; -- 2.47.2