version 1.11, 2007/05/29 04:47:17 |
version 1.12, 2012/10/01 00:21:19 |
|
|
|
|
#include <sys/cdefs.h> |
#include <sys/cdefs.h> |
|
|
/* |
|
* Structure filled in by dladdr(). |
|
*/ |
|
typedef struct dl_info { |
|
const char *dli_fname; /* Pathname of shared object. */ |
|
void *dli_fbase; /* Base address of shared object. */ |
|
const char *dli_sname; /* Name of nearest symbol. */ |
|
void *dli_saddr; /* Address of nearest symbol. */ |
|
} Dl_info; |
|
|
|
/* |
|
* User interface to the run-time linker. |
|
*/ |
|
__BEGIN_DECLS |
|
extern void *dlopen(const char *, int); |
|
extern int dlclose(void *); |
|
extern void *dlsym(void *, const char *); |
|
extern int dlctl(void *, int, void *); |
|
extern const char *dlerror(void); |
|
extern int dladdr(const void *, Dl_info *); |
|
__END_DECLS |
|
|
|
/* Values for dlopen `mode'. */ |
/* Values for dlopen `mode'. */ |
#define RTLD_LAZY 1 |
#define RTLD_LAZY 1 |
#define RTLD_NOW 2 |
#define RTLD_NOW 2 |
#define RTLD_GLOBAL 0x100 |
#define RTLD_GLOBAL 0x100 |
#define RTLD_LOCAL 0x000 |
#define RTLD_LOCAL 0x000 |
#define DL_LAZY RTLD_LAZY /* Compat */ |
|
#define RTLD_TRACE 0x200 |
#define RTLD_TRACE 0x200 |
|
|
/* |
/* |
|
|
#define RTLD_DEFAULT ((void *) -2) /* Use default search algorithm. */ |
#define RTLD_DEFAULT ((void *) -2) /* Use default search algorithm. */ |
#define RTLD_SELF ((void *) -3) /* Search the caller itself. */ |
#define RTLD_SELF ((void *) -3) /* Search the caller itself. */ |
|
|
|
#if __BSD_VISIBLE |
|
|
/* |
/* |
|
* Structure filled in by dladdr(). |
|
*/ |
|
typedef struct dl_info { |
|
const char *dli_fname; /* Pathname of shared object. */ |
|
void *dli_fbase; /* Base address of shared object. */ |
|
const char *dli_sname; /* Name of nearest symbol. */ |
|
void *dli_saddr; /* Address of nearest symbol. */ |
|
} Dl_info; |
|
|
|
/* |
* dlctl() commands |
* dlctl() commands |
*/ |
*/ |
#define DL_GETERRNO 1 |
#define DL_GETERRNO 1 |
|
|
#define DL_GETLOADADDR x |
#define DL_GETLOADADDR x |
#define DL_SETTHREADLCK 2 |
#define DL_SETTHREADLCK 2 |
#define DL_SETBINDLCK 3 |
#define DL_SETBINDLCK 3 |
|
|
|
#define DL_LAZY RTLD_LAZY /* Compat */ |
|
|
|
#endif /* __BSD_VISIBLE */ |
|
|
|
|
|
/* |
|
* User interface to the run-time linker. |
|
*/ |
|
__BEGIN_DECLS |
|
void *dlopen(const char *, int); |
|
int dlclose(void *); |
|
void *dlsym(void *__restrict, const char *__restrict); |
|
const char *dlerror(void); |
|
|
|
#if __BSD_VISIBLE |
|
int dladdr(const void *, Dl_info *); |
|
int dlctl(void *, int, void *); |
|
#endif /* __BSD_VISIBLE */ |
|
|
|
__END_DECLS |
|
|
#endif /* _DLFCN_H_ */ |
#endif /* _DLFCN_H_ */ |