dlfcn.h 745 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef _DLFCN_H
  2. #define _DLFCN_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <features.h>
  7. #define RTLD_LAZY 1
  8. #define RTLD_NOW 2
  9. #define RTLD_NOLOAD 4
  10. #define RTLD_NODELETE 4096
  11. #define RTLD_GLOBAL 256
  12. #define RTLD_LOCAL 0
  13. #define RTLD_NEXT ((void *)-1)
  14. #define RTLD_DEFAULT ((void *)0)
  15. #define RTLD_DI_LINKMAP 2
  16. int dlclose(void *);
  17. char *dlerror(void);
  18. void *dlopen(const char *, int);
  19. void *dlsym(void *__restrict, const char *__restrict);
  20. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  21. typedef struct {
  22. const char *dli_fname;
  23. void *dli_fbase;
  24. const char *dli_sname;
  25. void *dli_saddr;
  26. } Dl_info;
  27. int dladdr(const void *, Dl_info *);
  28. int dlinfo(void *, int, void *);
  29. #endif
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33. #endif