| ... | @@ -32,6 +32,24 @@ pub const Kevent = extern struct { | ... | @@ -32,6 +32,24 @@ pub const Kevent = extern struct { |
| 32 | udata: usize, | 32 | udata: usize, |
| 33 | }; | 33 | }; |
| 34 | | 34 | |
| | 35 | // Modes and flags for dlopen() |
| | 36 | // include/dlfcn.h |
| | 37 | |
| | 38 | /// Bind function calls lazily. |
| | 39 | pub const RTLD_LAZY = 1; |
| | 40 | |
| | 41 | /// Bind function calls immediately. |
| | 42 | pub const RTLD_NOW = 2; |
| | 43 | |
| | 44 | /// Make symbols globally available. |
| | 45 | pub const RTLD_GLOBAL = 0x100; |
| | 46 | |
| | 47 | /// Opposite of RTLD_GLOBAL, and the default. |
| | 48 | pub const RTLD_LOCAL = 0x000; |
| | 49 | |
| | 50 | /// Trace loaded objects and exit. |
| | 51 | pub const RTLD_TRACE = 0x200; |
| | 52 | |
| 35 | pub const dl_phdr_info = extern struct { | 53 | pub const dl_phdr_info = extern struct { |
| 36 | dlpi_addr: std.elf.Addr, | 54 | dlpi_addr: std.elf.Addr, |
| 37 | dlpi_name: ?[*:0]const u8, | 55 | dlpi_name: ?[*:0]const u8, |