about summary refs log tree commit diff
path: root/elf/dl-open.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-open.c')
-rw-r--r--elf/dl-open.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/elf/dl-open.c b/elf/dl-open.c
index d10ab8ac65..6d07e445d9 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -225,6 +225,10 @@ dl_open_worker (void *a)
       return;
     }
 
+  if (__builtin_expect (mode & __RTLD_SPROF, 0))
+    /* This happens only if we load a DSO for 'sprof'.  */
+    return;
+
   /* It was already open.  */
   if (new->l_searchlist.r_list != NULL)
     {