summary refs log tree commit diff
path: root/dlfcn
diff options
context:
space:
mode:
Diffstat (limited to 'dlfcn')
-rw-r--r--dlfcn/dlerror.c7
-rw-r--r--dlfcn/eval.c2
2 files changed, 6 insertions, 3 deletions
diff --git a/dlfcn/dlerror.c b/dlfcn/dlerror.c
index 0e02ca7d90..f732deb868 100644
--- a/dlfcn/dlerror.c
+++ b/dlfcn/dlerror.c
@@ -1,5 +1,5 @@
 /* Return error detail for failing <dlfcn.h> functions.
-   Copyright (C) 1995,1996,1997,1998,1999,2000,2002, 2003
+   Copyright (C) 1995,1996,1997,1998,1999,2000,2002,2003
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -38,6 +38,7 @@ static struct dl_action_result *static_buf;
 
 /* This is the key for the thread specific memory.  */
 static __libc_key_t key;
+__libc_once_define (static, once);
 
 /* Destructor for the thread-specific data.  */
 static void init (void);
@@ -50,6 +51,9 @@ dlerror (void)
   char *buf = NULL;
   struct dl_action_result *result;
 
+  /* If we have not yet initialized the buffer do it now.  */
+  __libc_once (once, init);
+
   /* Get error string.  */
   result = (struct dl_action_result *) __libc_getspecific (key);
   if (result == NULL)
@@ -100,7 +104,6 @@ int
 internal_function
 _dlerror_run (void (*operate) (void *), void *args)
 {
-  __libc_once_define (static, once);
   struct dl_action_result *result;
 
   /* If we have not yet initialized the buffer do it now.  */
diff --git a/dlfcn/eval.c b/dlfcn/eval.c
index cae8f00084..e0b56624f6 100644
--- a/dlfcn/eval.c
+++ b/dlfcn/eval.c
@@ -27,7 +27,7 @@
 #include <string.h>
 #include <unistd.h>
 
-static void *funcall (char **stringp);
+static void *funcall (char **stringp) __attribute_noinline__;
 static void *eval (char **stringp);