summaryrefslogtreecommitdiff
path: root/dlfcn/dladdr.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:31:37 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:31:37 +0000
commit74a412373b66a38b6ce8156f027ce26f89a7462f (patch)
treea59ce0af7ffd48641ca9124d697f7a6b57b26931 /dlfcn/dladdr.c
parent2004eeba8fb2a92105bbf95b280fff6dc1d84144 (diff)
parent4cbfda396f7cd9e83116c28965ade73d80c1cb82 (diff)
Merge commit 'refs/top-bases/t/ONSTACK' into t/ONSTACK
Diffstat (limited to 'dlfcn/dladdr.c')
-rw-r--r--dlfcn/dladdr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dlfcn/dladdr.c b/dlfcn/dladdr.c
index 28137f62f8..97f811f801 100644
--- a/dlfcn/dladdr.c
+++ b/dlfcn/dladdr.c
@@ -1,5 +1,5 @@
/* Locate the shared object symbol nearest a given address.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 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
@@ -17,6 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <dlfcn.h>
+#include <ldsodefs.h>
#if !defined SHARED && IS_IN (libdl)
@@ -32,7 +33,7 @@ int
__dladdr (const void *address, Dl_info *info)
{
# ifdef SHARED
- if (__glibc_unlikely (_dlfcn_hook != NULL))
+ if (!rtld_active ())
return _dlfcn_hook->dladdr (address, info);
# endif
return _dl_addr (address, info, NULL, NULL);