dlfcn.h 803 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. #if _REDIR_TIME64
  31. __REDIR(dlsym, __dlsym_time64);
  32. #endif
  33. #ifdef __cplusplus
  34. }
  35. #endif
  36. #endif