about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-open.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/elf/dl-open.c b/elf/dl-open.c
index ff19f811d5..6b8b218582 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -23,7 +23,7 @@ Cambridge, MA 02139, USA.  */
 #include <errno.h>
 
 
-extern void _dl_start (void); weak_extern (_dl_start)
+weak_extern (_DYNAMIC)
 
 extern int __libc_multiple_libcs;	/* Defined in init-first.c.  */
 
@@ -40,9 +40,6 @@ _dl_open (const char *file, int mode)
   struct link_map *new, *l;
   ElfW(Addr) init;
   struct r_debug *r;
-  /* To decide whether we are the static libc or not.  We must use
-     this variable since gcc would otherwise optimize the test away.  */
-  void (*dl_start_ptr) (void) = &_dl_start;
 
   /* Load the named object.  */
   new = _dl_map_object (NULL, file, lt_loaded);
@@ -144,10 +141,9 @@ _dl_open (const char *file, int mode)
     (*(void (*) (int, char **, char **)) init) (__libc_argc, __libc_argv,
 						__environ);
 
-  if (dl_start_ptr == NULL)
-    /* We must be the static _dl_open in libc.a because ld.so.1 is not
-       in scope.  A static program that has loaded a dynamic object
-       now has competition.  */
+  if (_DYNAMIC == NULL)
+    /* We must be the static _dl_open in libc.a.  A static program that
+       has loaded a dynamic object now has competition.  */
     __libc_multiple_libcs = 1;
 
   return new;