|
@@ -173,9 +173,8 @@ typedef struct dso_meth_st
|
|
|
|
|
|
/* Return pathname of the module containing location */
|
|
|
int (*pathbyaddr)(void *addr,char *path,int sz);
|
|
|
- /* Perform global symbol lookup, i.e. among *all* modules,
|
|
|
- * see commentray in dso_lib.c for further details. */
|
|
|
- DSO_FUNC_TYPE (*globallookup)(const char *symname);
|
|
|
+ /* Perform global symbol lookup, i.e. among *all* modules */
|
|
|
+ void *(*globallookup)(const char *symname);
|
|
|
} DSO_METHOD;
|
|
|
|
|
|
/**********************************************************************/
|
|
@@ -313,6 +312,16 @@ DSO_METHOD *DSO_METHOD_vms(void);
|
|
|
*/
|
|
|
int DSO_pathbyaddr(void *addr,char *path,int sz);
|
|
|
|
|
|
+/* 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 usage for this function is to probe *core*
|
|
|
+ * system functionality, e.g. check if getnameinfo(3) is available
|
|
|
+ * at run-time without bothering about OS-specific details such as
|
|
|
+ * libc.so.versioning or where does it actually reside: in libc
|
|
|
+ * itself or libsocket. */
|
|
|
+void *DSO_global_lookup(const char *name);
|
|
|
+
|
|
|
/* BEGIN ERROR CODES */
|
|
|
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
|
|
* made after this point may be overwritten when the script is next run.
|