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/dlinfo.c | |
parent | c78cb58c50d04f98c752ee576a0f8e1daae78d38 (diff) | |
download | glibc-e9e4030ae5f685547a9f7ead1362c7526aa88b80.tar glibc-e9e4030ae5f685547a9f7ead1362c7526aa88b80.tar.gz glibc-e9e4030ae5f685547a9f7ead1362c7526aa88b80.tar.bz2 glibc-e9e4030ae5f685547a9f7ead1362c7526aa88b80.zip |
Updated to fedora-glibc-20041018T0940cvs/fedora-glibc-2_3_3-70
Diffstat (limited to 'dlfcn/dlinfo.c')
-rw-r--r-- | dlfcn/dlinfo.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/dlfcn/dlinfo.c b/dlfcn/dlinfo.c index d54a13259a..44af55a303 100644 --- a/dlfcn/dlinfo.c +++ b/dlfcn/dlinfo.c @@ -22,6 +22,16 @@ #include <ldsodefs.h> #include <libintl.h> +#if !defined SHARED && defined IS_IN_libdl + +int +dlinfo (void *handle, int request, void *arg) +{ + return __dlinfo (handle, request, arg, RETURN_ADDRESS (0)); +} + +#else + struct dlinfo_args { ElfW(Addr) caller; @@ -36,7 +46,7 @@ dlinfo_doit (void *argsblock) struct dlinfo_args *const args = argsblock; struct link_map *l = args->handle; -#if 0 +# if 0 if (args->handle == RTLD_SELF) { Lmid_t nsid; @@ -53,7 +63,7 @@ dlinfo_doit (void *argsblock) GLRO(dl_signal_error) (0, NULL, NULL, N_("\ RTLD_SELF used in code not dynamically loaded")); } -#endif +# endif switch (args->request) { @@ -84,9 +94,19 @@ RTLD_SELF used in code not dynamically loaded")); } int -dlinfo (void *handle, int request, void *arg) +__dlinfo (void *handle, int request, void *arg DL_CALLER_DECL) { - struct dlinfo_args args = { (ElfW(Addr)) RETURN_ADDRESS (0), +# ifdef SHARED + if (__builtin_expect (_dlfcn_hook != NULL, 0)) + return _dlfcn_hook->dlinfo (handle, request, arg, + DL_CALLER); +# endif + + struct dlinfo_args args = { (ElfW(Addr)) DL_CALLER, handle, request, arg }; return _dlerror_run (&dlinfo_doit, &args) ? -1 : 0; } +# ifdef SHARED +strong_alias (__dlinfo, dlinfo) +# endif +#endif |