diff options
author | Jakub Jelinek <jakub@redhat.com> | 2004-10-18 23:30:23 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2004-10-18 23:30:23 +0000 |
commit | e9e4030ae5f685547a9f7ead1362c7526aa88b80 (patch) | |
tree | 5191067336dc7eed72c15bd9ebdcf9e5ec6af35c /dlfcn/dlsym.c | |
parent | c78cb58c50d04f98c752ee576a0f8e1daae78d38 (diff) |
Updated to fedora-glibc-20041018T0940cvs/fedora-glibc-2_3_3-70
Diffstat (limited to 'dlfcn/dlsym.c')
-rw-r--r-- | dlfcn/dlsym.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/dlfcn/dlsym.c b/dlfcn/dlsym.c index 76dda5973f..a656ca63ce 100644 --- a/dlfcn/dlsym.c +++ b/dlfcn/dlsym.c @@ -22,6 +22,16 @@ #include <ldsodefs.h> +#if !defined SHARED && defined IS_IN_libdl + +void * +dlsym (void *handle, const char *name) +{ + return __dlsym (handle, name, RETURN_ADDRESS (0)); +} + +#else + struct dlsym_args { /* The arguments to dlsym_doit. */ @@ -43,10 +53,15 @@ dlsym_doit (void *a) void * -dlsym (void *handle, const char *name) +__dlsym (void *handle, const char *name DL_CALLER_DECL) { +# ifdef SHARED + if (__builtin_expect (_dlfcn_hook != NULL, 0)) + return _dlfcn_hook->dlsym (handle, name, DL_CALLER); +# endif + struct dlsym_args args; - args.who = RETURN_ADDRESS (0); + args.who = DL_CALLER; args.handle = handle; args.name = name; @@ -59,3 +74,7 @@ dlsym (void *handle, const char *name) return result; } +# ifdef SHARED +strong_alias (__dlsym, dlsym) +# endif +#endif |