* Copyright 2003-2012 Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _DLFCN_H
#define _DLFCN_H
#include <sys/types.h>
#define RTLD_LAZY 0 /* relocations are performed as needed */
#define RTLD_NOW 1 /* the file gets relocated at load time */
#define RTLD_LOCAL 0 /* symbols are not available for relocating any other object */
#define RTLD_GLOBAL 2 /* all symbols are available */
#define RTLD_NOLOAD 4 /* do not load any new object */
#define RTLD_GROUP 8 /* do not lookup symbols in the global symbol table */
#define RTLD_DEFAULT ((void*)0)
#define RTLD_NEXT ((void*)-1L)
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
const char *dli_fname;
void *dli_fbase;
const char *dli_sname;
void *dli_saddr;
} Dl_info_t;
typedef Dl_info_t Dl_info;
extern int dlclose(void *image);
extern char *dlerror(void);
extern void *dlopen(const char *path, int mode);
extern void *dlsym(void *image, const char *symbolName);
extern int dladdr(const void *addr, Dl_info_t *info);
#ifdef __cplusplus
}
#endif
#endif