/* Look up a versioned symbol in a shared object loaded by `dlopen'.
- Copyright (C) 1995-2000, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1995-2019 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
#include <ldsodefs.h>
-#if !defined SHARED && defined IS_IN_libdl
+#if !defined SHARED && IS_IN (libdl)
void *
weak_function
DL_CALLER_DECL)
{
# ifdef SHARED
- if (__builtin_expect (_dlfcn_hook != NULL, 0))
+ if (!rtld_active ())
return _dlfcn_hook->dlvsym (handle, name, version_str, DL_CALLER);
# endif