|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH 2/4] lib/posix-libdl: Import dlfcn.h from musl
Copied as is from the official musl git mirror
git://git.musl-libc.org/musl, commit 6fcb440d.
Original file locations:
* include/dlfcn.h
It's not important where we copy these declarations from given that we intend
to use only stubs. We chose musl only for consistency with previous code
imports.
Signed-off-by: Andrei Gogonea <andrei.gogonea09@xxxxxxxxx>
Signed-off-by: Teodora Serbanescu <teo.serbanescu16@xxxxxxxxx>
Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
lib/posix-libdl/include/dlfcn.h | 42 +++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644 lib/posix-libdl/include/dlfcn.h
diff --git a/lib/posix-libdl/include/dlfcn.h b/lib/posix-libdl/include/dlfcn.h
new file mode 100644
index 00000000..78fb0733
--- /dev/null
+++ b/lib/posix-libdl/include/dlfcn.h
@@ -0,0 +1,42 @@
+#ifndef _DLFCN_H
+#define _DLFCN_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <features.h>
+
+#define RTLD_LAZY 1
+#define RTLD_NOW 2
+#define RTLD_NOLOAD 4
+#define RTLD_NODELETE 4096
+#define RTLD_GLOBAL 256
+#define RTLD_LOCAL 0
+
+#define RTLD_NEXT ((void *)-1)
+#define RTLD_DEFAULT ((void *)0)
+
+#define RTLD_DI_LINKMAP 2
+
+int dlclose(void *);
+char *dlerror(void);
+void *dlopen(const char *, int);
+void *dlsym(void *__restrict, const char *__restrict);
+
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+typedef struct {
+ const char *dli_fname;
+ void *dli_fbase;
+ const char *dli_sname;
+ void *dli_saddr;
+} Dl_info;
+int dladdr(const void *, Dl_info *);
+int dlinfo(void *, int, void *);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--
2.20.1
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |