diff options
Diffstat (limited to 'dlfcn/dladdr.c')
-rw-r--r-- | dlfcn/dladdr.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/dlfcn/dladdr.c b/dlfcn/dladdr.c index b5490e5a8d..d0462b94ff 100644 --- a/dlfcn/dladdr.c +++ b/dlfcn/dladdr.c @@ -1,5 +1,6 @@ /* Locate the shared object symbol nearest a given address. - Copyright (C) 1996, 1997, 1998, 1999, 2003 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999, 2003, 2004 + 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 @@ -19,8 +20,26 @@ #include <dlfcn.h> +#if !defined SHARED && defined IS_IN_libdl + int dladdr (const void *address, Dl_info *info) { + return __dladdr (address, info); +} + +#else + +int +__dladdr (const void *address, Dl_info *info) +{ +# ifdef SHARED + if (__builtin_expect (_dlfcn_hook != NULL, 0)) + return _dlfcn_hook->dladdr (address, info); +# endif return _dl_addr (address, info, NULL, NULL); } +# ifdef SHARED +strong_alias (__dladdr, dladdr) +# endif +#endif |