2 * Copyright 2003-2012 Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
12 #define RTLD_LAZY 0 /* relocations are performed as needed */
13 #define RTLD_NOW 1 /* the file gets relocated at load time */
14 #define RTLD_LOCAL 0 /* symbols are not available for relocating any other object */
15 #define RTLD_GLOBAL 2 /* all symbols are available */
17 /* not-yet-POSIX extensions (dlsym() handles) */
18 #define RTLD_DEFAULT ((void*)0)
19 /* find the symbol in the global scope */
20 #define RTLD_NEXT ((void*)-1L)
21 /* find the next definition of the symbol */
27 /* This is a gnu extension for the dladdr function */
29 const char *dli_fname
; /* Filename of defining object */
30 void *dli_fbase
; /* Load address of that object */
31 const char *dli_sname
; /* Name of nearest lower symbol */
32 void *dli_saddr
; /* Exact value of nearest symbol */
35 extern int dlclose(void *image
);
36 extern char *dlerror(void);
37 extern void *dlopen(const char *path
, int mode
);
38 extern void *dlsym(void *image
, const char *symbolName
);
39 extern int dladdr(const void *addr
, Dl_info
*info
);