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:32:50 +0000 |
commit | b39eda7ee69a9277c722f8789736e00dc680cda6 (patch) | |
tree | b1ac9b808c0389199750c785bd5c1b5a3189d4c7 /include/internal/dso.h | |
parent | cb6ea61c161e88aa0268c77f308469a67b2ec063 (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>
Diffstat (limited to 'include/internal/dso.h')
-rw-r--r-- | include/internal/dso.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/internal/dso.h b/include/internal/dso.h index 6f50f005a9..6acd5013c1 100644 --- a/include/internal/dso.h +++ b/include/internal/dso.h @@ -43,6 +43,11 @@ 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 + +/* * This flag loads the library with public symbols. Meaning: The exported * symbols of this library are public to all libraries loaded after this * library. At the moment only implemented in unix. @@ -142,6 +147,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 |