diff options
author | Matt Caswell <matt@openssl.org> | 2016-10-15 16:01:40 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-11-02 23:37:26 +0000 |
commit | f722f18e1a3560c13bd018711a30acca73c8d619 (patch) | |
tree | 65fe5f75261983b0e01ffac865eeb3a3cba14ed3 /include | |
parent | 93558bf5190226494d3b549397fbf94214846d0d (diff) |
Add a DSO_dsobyaddr() function
This works the same way as DSO_pathbyaddr() but instead returns a ptr to
the DSO that contains the provided symbol.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit b39eda7ee69a9277c722f8789736e00dc680cda6)
Diffstat (limited to 'include')
-rw-r--r-- | include/internal/dso.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/internal/dso.h b/include/internal/dso.h index f513cad3b7..f5de8a284a 100644 --- a/include/internal/dso.h +++ b/include/internal/dso.h @@ -43,6 +43,10 @@ extern "C" { # define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY 0x02 /* + * Don't unload the DSO when we call DSO_free() + */ +# define DSO_FLAG_NO_UNLOAD_ON_FREE 0x04 +/* * The following flag controls the translation of symbol names to upper case. * This is currently only being implemented for OpenVMS. */ @@ -148,6 +152,12 @@ DSO_METHOD *DSO_METHOD_openssl(void); int DSO_pathbyaddr(void *addr, char *path, int sz); /* + * Like DSO_pathbyaddr() but instead returns a handle to the DSO for the symbol + * or NULL on error. + */ +DSO *DSO_dsobyaddr(void *addr, int flags); + +/* * This function should be used with caution! It looks up symbols in *all* * loaded modules and if module gets unloaded by somebody else attempt to * dereference the pointer is doomed to have fatal consequences. Primary |