[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


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Wed, 14 Aug 2019 17:56:30 +0300
  • Cc: felipe.huici@xxxxxxxxx, simon.kuenzer@xxxxxxxxx, Andrei Gogonea <andrei.gogonea09@xxxxxxxxx>, sharan.santhanam@xxxxxxxxx, Teodora Serbanescu <teo.serbanescu16@xxxxxxxxx>
  • Delivery-date: Wed, 14 Aug 2019 14:56:53 +0000
  • Ironport-phdr: 9a23:IT/EIheu+VTUrJAqL2rfUCBSlGMj4u6mDksu8pMizoh2WeGdxc27YhON2/xhgRfzUJnB7Loc0qyK6vqmADZRqs/e+Fk5M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aFRrwLxd6KfroEYDOkcu3y/qy+5rOaAlUmTaxe7x/IAiooQnLq8Uan49vJqksxhbLv3BFZ/lYyWR0KFyJgh3y/N2w/Jlt8yRRv/Iu6ctNWrjkcqo7ULJVEi0oP3g668P3uxbDSxCP5mYHXWUNjhVIGQnF4wrkUZr3ryD3q/By2CiePc3xULA0RTGv5LplRRP0lCsKMSMy/XrJgcJskq1UvBOhpwR+w4HKZoGVKOF+db7Zcd8DWGZNQtpdWylHD4ihbYUAEvABMP5YoYfjulUAoxiwCw6uC+Ph0TJEmmP60Lcm3+k7DQ3KwAotFM8OvnTOq9X1Mb8fXP6yzKnT0TXDbvVW0ir75ojVahAhvOyHULVsfsrW0kkvCwLFjlOKpYzhIjOVzvkNvnOH4Op7T+6vk3MnpBprrji1wcchk4/EjZ8bxFDD8CV22oc1JdugRU5+fN6kC59QuzieN4t3WcwtX3tkuCEgyr0Jv5OwYSsEyIw/yhLCZPGLbpKE7xHjWeqLPzt0mnBodKixihqq7EStxfDwWtO33VtKtCZJjNfBu34X2xDO5cWLVP1w9Vq71zmVzQDc8ORELFgxlarcNpEu3KY9loEWsUTfBi/2n1j2jLOOekUk5Oeo7+Pnb634pp+ZLYB0iwX+Pr4ylcykG+g4KhUOUHOB9eSm073v5Uz5QLNUgf0qiqTVrZ/XKdkBqqO6AwJZyJgv5wi9Aju83tkUhXwHI0hEeBKDgYjpIVbOIPXgAPijhFSsiytrx/HAPrH7BpXNM2DDkKr6cLlh8E5Q0hIzzc1E6J5OELEBJ+r/WlXtu9zAEh85Lwu0zv79B9V7y4weQ3yAAq6DPKPdtl+I6eUvI++Sa4APpDrwL+Mo5/HrjXAjmF8debOl0ocQaHC9Bv5mOVmWYWLwgtcdFmcHphY+Q/LtiFGYSj5ceWyyULkm6TE9Fo2mFpvMRp2wjLGAxyq7EZhWaXpHClCIC3vna4KEW/IUYiKIPsBhiiAEVaSmS4I50BGutQn6y7tgLurP4yEXqIzs1MZr6O3Xjhwy8T10D9+B02GWVW11kX0HRzks0KB4u0x9xU+J0bJkjPxACdxT+/RJXx80NZHCy+x6CsjyVRzbcteJVVamQ8mpATAqQ9I33dABf0J9FM+5gRzZwSWqHqcfl6aXC5ws7qLcw3/xKt5my3bGzqYhlUMpQs1VOW29nKF/8RTTB47TnEWfjamqcL8R3CjT+2ifyWqBplpXXBRuXqXYRXoffFfZrczl5kPeSL+jEa8nMgpEyc6FLKtGcN7pjUhYS/flOdXRfXixlny2BRmW2ryMaJDldH4H0CrDFUhX2zwUqHOHMwk5HWKtrnzTCBRqFEnzeAX8/O84r2m0HWEuyATfREp6y7uzsjoIneHUH/gUxa4FvmElti1pNF2mmcrLAZyaoFwyL+1nfdoh7QIfhirivAtnM8nldvg6iw==
  • Ironport-sdr: bsXoTIaZH7mXXxlhsRE9ZS3Nym+DWlMGl6gROnXRAjhOe/dzeahlKPiTpNO3P9qsTNX/a9Ljvo kl1Qcza1iLjA==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.