#ifndef _DLFCN_H
#include <dlfcn/dlfcn.h>
+#ifndef _ISOMAC
#include <link.h> /* For ElfW. */
#include <stdbool.h>
#define __RTLD_OPENEXEC 0x20000000
#define __RTLD_CALLMAP 0x10000000
#define __RTLD_AUDIT 0x08000000
+#define __RTLD_SECURE 0x04000000 /* Apply additional security checks. */
+#define __RTLD_NOIFUNC 0x02000000 /* Suppress calling ifunc functions. */
#define __LM_ID_CALLER -2
#define __libc_dlopen(name) \
__libc_dlopen_mode (name, RTLD_LAZY | __RTLD_DLOPEN)
-extern void *__libc_dlopen_mode (__const char *__name, int __mode);
-extern void *__libc_dlsym (void *__map, __const char *__name);
+extern void *__libc_dlopen_mode (const char *__name, int __mode);
+extern void *__libc_dlsym (void *__map, const char *__name);
extern int __libc_dlclose (void *__map);
libc_hidden_proto (__libc_dlopen_mode)
libc_hidden_proto (__libc_dlsym)
libc_hidden_proto (_dl_addr)
#endif
+struct link_map;
+
/* Close an object previously opened by _dl_open. */
extern void _dl_close (void *map) attribute_hidden;
+/* Same as above, but without locking and safety checks for user
+ provided map arguments. */
+extern void _dl_close_worker (struct link_map *map) attribute_hidden;
/* Look up NAME in shared object HANDLE (which may be RTLD_DEFAULT or
RTLD_NEXT). WHO is the calling function, for RTLD_NEXT. Returns
extern void __libc_register_dlfcn_hook (struct link_map *map)
attribute_hidden;
#endif
+#endif
#endif