The OpenD Programming Language

1 /**
2  * D header file for Solaris
3  *
4  * $(LINK2 http://src.illumos.org/source/xref/illumos-gate/usr/src/head/dlfcn.h, illumos dlfcn.h)
5  */
6 
7 module core.sys.solaris.dlfcn;
8 
9 version (Solaris):
10 extern (C):
11 nothrow:
12 @nogc:
13 
14 public import core.sys.posix.dlfcn;
15 import core.stdc.config;
16 
17 enum
18 {
19     RTLD_NEXT    = cast(void *)-1,
20     RTLD_DEFAULT = cast(void *)-2,
21     RTLD_SELF    = cast(void *)-3,
22     RTLD_PROBE   = cast(void *)-4,
23 }
24 
25 alias c_ulong Lmid_t;
26 
27 void* dlmopen(Lmid_t, const scope char*, int);
28 
29 enum
30 {
31     RTLD_REL_RELATIVE = 0x00001,
32     RTLD_REL_EXEC     = 0x00002,
33     RTLD_REL_DEPENDS  = 0x00004,
34     RTLD_REL_PRELOAD  = 0x00008,
35     RTLD_REL_SELF     = 0x00010,
36     RTLD_REL_WEAK     = 0x00020,
37     RTLD_REL_ALL      = 0x00fff,
38     RTLD_MEMORY       = 0x01000,
39     RTLD_STRIP        = 0x02000,
40     RTLD_NOHEAP       = 0x04000,
41     RTLD_CONFSET      = 0x10000,
42 }
43 
44 int dldump(const scope char*, const scope char*, int);
45 
46 enum
47 {
48     RTLD_DL_SYMENT = 1,
49     RTLD_DL_LINKMAP = 2,
50 }
51 
52 int dladdr1(void*, Dl_info*, void**, int);
53 
54 enum
55 {
56     RTLD_DI_LMID         = 1,
57     RTLD_DI_LINKMAP      = 2,
58     RTLD_DI_CONFIGADDR   = 3,
59     RTLD_DI_SERINFO      = 4,
60     RTLD_DI_SERINFOSIZE  = 5,
61     RTLD_DI_ORIGIN       = 6,
62     RTLD_DI_PROFILENAME  = 7,
63     RTLD_DI_PROFILEOUT   = 8,
64     RTLD_DI_GETSIGNAL    = 9,
65     RTLD_DI_SETSIGNAL    = 10,
66     RTLD_DI_ARGSINFO     = 11,
67     RTLD_DI_MMAPS        = 12,
68     RTLD_DI_MMAPCNT      = 13,
69     RTLD_DI_DEFERRED     = 14,
70     RTLD_DI_DEFERRED_SYM = 15,
71     RTLD_DI_MAX          = 15,
72 }
73 
74 int dlinfo(void*, int, void*);
75 
76 struct Dl_serpath
77 {
78     char*  dls_name;
79     uint   dls_flags;
80 }
81 
82 struct Dl_serinfo
83 {
84     size_t         dls_size;
85     uint           dls_cnt;
86     Dl_serpath[1]  dls_serpath;
87 }
88 
89 // FIXME: Dl_argsinfo, Dl_mapinfo, Dl_amd64_unwindinfo are missing