summaryrefslogtreecommitdiff
path: root/include/dlfcn.h
diff options
context:
space:
mode:
authorKacper <kacper@mail.openlinux.dev>2025-12-07 20:10:31 +0100
committerKacper <kacper@mail.openlinux.dev>2025-12-07 20:10:31 +0100
commitfc00c656c96528112d05cf0edf8631bd5eaea446 (patch)
treea6e0e6c588191a8bd1c64afc3b7a258e3e66c236 /include/dlfcn.h
Add build system scaffolding and libc headers
Diffstat (limited to 'include/dlfcn.h')
-rw-r--r--include/dlfcn.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/dlfcn.h b/include/dlfcn.h
new file mode 100644
index 00000000..7ad29e87
--- /dev/null
+++ b/include/dlfcn.h
@@ -0,0 +1,22 @@
+#ifndef __DLFCN_H
+#define __DLFCN_H
+
+typedef struct {
+ const char *dli_fname;
+ void *dli_fbase;
+ const char *dli_sname;
+ void *dli_saddr;
+} Dl_info_t;
+
+#define RTLD_LOCAL 0x00000
+#define RTLD_LAZY 0x00001
+#define RTLD_NOW 0x00002
+#define RTLD_GLOBAL 0x00100
+
+int dladdr(const void *restrict, Dl_info_t *restrict);
+int dlclose(void *);
+char *dlerror(void);
+void *dlopen(const char *, int);
+void *dlsym(void *restrict, const char *restrict);
+
+#endif