|
1 | 1 | pub type pthread_t = c_ulong;
|
2 | 2 | pub type __priority_which_t = ::c_uint;
|
3 | 3 | pub type __rlimit_resource_t = ::c_uint;
|
| 4 | +pub type Lmid_t = ::c_long; |
4 | 5 |
|
5 | 6 | s! {
|
6 | 7 | pub struct statx {
|
@@ -337,6 +338,21 @@ pub const USER_PROCESS: ::c_short = 7;
|
337 | 338 | pub const DEAD_PROCESS: ::c_short = 8;
|
338 | 339 | pub const ACCOUNTING: ::c_short = 9;
|
339 | 340 |
|
| 341 | +// dlfcn.h |
| 342 | +pub const LM_ID_BASE: ::c_long = 0; |
| 343 | +pub const LM_ID_NEWLM: ::c_long = -1; |
| 344 | + |
| 345 | +pub const RTLD_DI_LMID: ::c_int = 1; |
| 346 | +pub const RTLD_DI_LINKMAP: ::c_int = 2; |
| 347 | +pub const RTLD_DI_CONFIGADDR: ::c_int = 3; |
| 348 | +pub const RTLD_DI_SERINFO: ::c_int = 4; |
| 349 | +pub const RTLD_DI_SERINFOSIZE: ::c_int = 5; |
| 350 | +pub const RTLD_DI_ORIGIN: ::c_int = 6; |
| 351 | +pub const RTLD_DI_PROFILENAME: ::c_int = 7; |
| 352 | +pub const RTLD_DI_PROFILEOUT: ::c_int = 8; |
| 353 | +pub const RTLD_DI_TLS_MODID: ::c_int = 9; |
| 354 | +pub const RTLD_DI_TLS_DATA: ::c_int = 10; |
| 355 | + |
340 | 356 | pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
|
341 | 357 |
|
342 | 358 | pub const SOL_RXRPC: ::c_int = 272;
|
@@ -1024,6 +1040,20 @@ extern "C" {
|
1024 | 1040 | ) -> ::c_int;
|
1025 | 1041 | }
|
1026 | 1042 |
|
| 1043 | +#[link(name = "dl")] |
| 1044 | +extern "C" { |
| 1045 | + pub fn dlmopen( |
| 1046 | + lmid: Lmid_t, |
| 1047 | + filename: *const ::c_char, |
| 1048 | + flag: ::c_int, |
| 1049 | + ) -> *mut ::c_void; |
| 1050 | + pub fn dlinfo( |
| 1051 | + handle: *mut ::c_void, |
| 1052 | + request: ::c_int, |
| 1053 | + info: *mut ::c_void, |
| 1054 | + ) -> ::c_int; |
| 1055 | +} |
| 1056 | + |
1027 | 1057 | cfg_if! {
|
1028 | 1058 | if #[cfg(any(target_arch = "x86",
|
1029 | 1059 | target_arch = "arm",
|
|
0 commit comments