dlfcn.h 928 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef DLFCN_H
  2. #define DLFCN_H
  3. #include <features.h>
  4. /*
  5. * Various defines and so forth for the dynamic linker
  6. */
  7. /* For dlopen () */
  8. #define RTLD_LAZY 1
  9. #define RTLD_NOW 2
  10. #define RTLD_GLOBAL 0x100
  11. /* For dlsym */
  12. #define RTLD_NEXT ((void *)-1)
  13. __BEGIN_DECLS
  14. /* The usual prototypes. We use void * instead of the actual
  15. * datatype - the user does not manipulate the handles at all.
  16. */
  17. extern void * dlopen __P((__const char * __filename, int __flag));
  18. extern __const char * dlerror __P((void));
  19. extern void * dlsym __P((void *, __const char *));
  20. extern int dlclose __P((void *));
  21. typedef struct
  22. {
  23. const char * dli_fname; /* filename */
  24. void * dli_fbase; /* base address of object */
  25. const char * dli_sname; /* nearest symbol name */
  26. void * dli_saddr; /* nearest symbol address */
  27. } Dl_info;
  28. extern int dladdr __P((void * __address, Dl_info * __dlip ));
  29. __END_DECLS
  30. #endif