diff options
Diffstat (limited to 'elf/dl-object.c')
-rw-r--r-- | elf/dl-object.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/elf/dl-object.c b/elf/dl-object.c index 86f7a8e4d9..33ee860e59 100644 --- a/elf/dl-object.c +++ b/elf/dl-object.c @@ -1,5 +1,5 @@ /* Storage management for the chain of loaded shared objects. - Copyright (C) 1995-2002, 2004 Free Software Foundation, Inc. + Copyright (C) 1995-2002, 2004, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -64,7 +64,7 @@ _dl_new_object (char *realname, const char *libname, int type, new->l_name = realname; new->l_type = type; new->l_loader = loader; -#if defined USE_TLS && NO_TLS_OFFSET != 0 +#if NO_TLS_OFFSET != 0 new->l_tls_offset = NO_TLS_OFFSET; #endif new->l_ns = nsid; @@ -85,6 +85,11 @@ _dl_new_object (char *realname, const char *libname, int type, new->l_scope = new->l_scope_mem; new->l_scope_max = sizeof (new->l_scope_mem) / sizeof (new->l_scope_mem[0]); + /* No need to initialize the scope lock if the initializer is zero. */ +#if _RTLD_MRLOCK_INITIALIZER != 0 + __rtld_mrlock_initialize (new->l_scope_lock); +#endif + /* Counter for the scopes we have to handle. */ idx = 0; |