diff options
author | Andy Polyakov <appro@openssl.org> | 2005-06-05 18:13:38 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2005-06-05 18:13:38 +0000 |
commit | 7ed876533aa7c8e721836c25cef737c3643f5e55 (patch) | |
tree | 3978ef9d2c18ec4e176bbf4b7e0c0517202fb012 /crypto/dso/dso_lib.c | |
parent | b2d91a69133e5b8e546f5316f1005e6553194d81 (diff) | |
download | openssl-7ed876533aa7c8e721836c25cef737c3643f5e55.tar.gz |
New function, DSO_pathbyaddr, to find pathname for loaded shared object
by an address within it. Tested on Linux, Solaris, IRIX, Tru64, Darwin,
HP-UX, Win32, few BSD flavors...
Diffstat (limited to 'crypto/dso/dso_lib.c')
-rw-r--r-- | crypto/dso/dso_lib.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crypto/dso/dso_lib.c b/crypto/dso/dso_lib.c index 49bdd71309..0869a646f6 100644 --- a/crypto/dso/dso_lib.c +++ b/crypto/dso/dso_lib.c @@ -464,3 +464,15 @@ const char *DSO_get_loaded_filename(DSO *dso) } return(dso->loaded_filename); } + +int DSO_pathbyaddr(void *addr,char *path,int sz) + { + DSO_METHOD *meth = default_DSO_meth; + if (meth == NULL) meth = DSO_METHOD_openssl(); + if (meth->pathbyaddr == NULL) + { + DSOerr(DSO_F_PATHBYADDR,DSO_R_UNSUPPORTED); + return(NULL); + } + return (*meth->pathbyaddr)(addr,path,sz); + } |