Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 1 | #ifndef _DLFCN_H |
2 | #define _DLFCN_H | ||||
3 | |||||
Rich Felker | 230f181 | 2011-06-27 01:02:28 -0400 | [diff] [blame] | 4 | #ifdef __cplusplus |
5 | extern "C" { | ||||
6 | #endif | ||||
7 | |||||
Rich Felker | c1a9658 | 2012-09-07 23:13:55 -0400 | [diff] [blame] | 8 | #include <features.h> |
Rich Felker | 400c5e5 | 2012-09-06 22:44:55 -0400 | [diff] [blame] | 9 | |
Rich Felker | 87a30ce | 2011-06-27 01:01:19 -0400 | [diff] [blame] | 10 | #define RTLD_LAZY 1 |
11 | #define RTLD_NOW 2 | ||||
Rich Felker | 4d07e55 | 2013-01-23 22:07:45 -0500 | [diff] [blame] | 12 | #define RTLD_NOLOAD 4 |
Rich Felker | 55ddbc3 | 2013-01-23 22:18:45 -0500 | [diff] [blame] | 13 | #define RTLD_NODELETE 4096 |
Rich Felker | 87a30ce | 2011-06-27 01:01:19 -0400 | [diff] [blame] | 14 | #define RTLD_GLOBAL 256 |
15 | #define RTLD_LOCAL 0 | ||||
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 16 | |
Rich Felker | 230f181 | 2011-06-27 01:02:28 -0400 | [diff] [blame] | 17 | #define RTLD_NEXT ((void *)-1) |
18 | #define RTLD_DEFAULT ((void *)0) | ||||
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 19 | |
Rich Felker | 780cbbe | 2013-06-29 12:46:46 -0400 | [diff] [blame] | 20 | #define RTLD_DI_LINKMAP 2 |
21 | |||||
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 22 | int dlclose(void *); |
23 | char *dlerror(void); | ||||
24 | void *dlopen(const char *, int); | ||||
Rich Felker | 400c5e5 | 2012-09-06 22:44:55 -0400 | [diff] [blame] | 25 | void *dlsym(void *__restrict, const char *__restrict); |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 26 | |
Rich Felker | ac5d085 | 2012-09-06 22:58:34 -0400 | [diff] [blame] | 27 | #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
Rich Felker | f419bcb | 2012-08-26 21:09:26 -0400 | [diff] [blame] | 28 | typedef struct { |
29 | const char *dli_fname; | ||||
30 | void *dli_fbase; | ||||
31 | const char *dli_sname; | ||||
32 | void *dli_saddr; | ||||
33 | } Dl_info; | ||||
Rich Felker | 839cc4e | 2014-01-06 22:03:38 -0500 | [diff] [blame] | 34 | int dladdr(const void *, Dl_info *); |
Rich Felker | 780cbbe | 2013-06-29 12:46:46 -0400 | [diff] [blame] | 35 | int dlinfo(void *, int, void *); |
Rich Felker | f419bcb | 2012-08-26 21:09:26 -0400 | [diff] [blame] | 36 | #endif |
37 | |||||
Rich Felker | 230f181 | 2011-06-27 01:02:28 -0400 | [diff] [blame] | 38 | #ifdef __cplusplus |
39 | } | ||||
40 | #endif | ||||
41 | |||||
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 42 | #endif |