• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef	_DLFCN_H
2 #define	_DLFCN_H
3 
4 #include <features.h>
5 #include <stdbool.h>
6 
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 
11 #define RTLD_LAZY   1
12 #define RTLD_NOW    2
13 #define RTLD_NOLOAD 4
14 #define RTLD_NODELETE 4096
15 #define RTLD_GLOBAL 256
16 #define RTLD_LOCAL  0
17 
18 #define RTLD_NEXT    ((void *)-1)
19 #define RTLD_DEFAULT ((void *)0)
20 
21 #define RTLD_DI_LINKMAP 2
22 
23 int    dlclose(void *);
24 char  *dlerror(void);
25 void  *dlopen(const char *, int);
26 void  *dlsym(void *__restrict, const char *__restrict);
27 
28 /* namespace apis */
29 #define NS_NAME_MAX 255
30 typedef struct {
31 	char name[NS_NAME_MAX+1];
32 } Dl_namespace;
33 
34 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
35 typedef struct {
36 	const char *dli_fname;
37 	void *dli_fbase;
38 	const char *dli_sname;
39 	void *dli_saddr;
40 } Dl_info;
41 int dladdr(const void *, Dl_info *);
42 #endif
43 
44 #if _REDIR_TIME64
45 __REDIR(dlsym, __dlsym_time64);
46 #endif
47 
48 #ifdef __cplusplus
49 }
50 #endif
51 
52 #endif
53