dl-defs.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef _LD_DEFS_H
  2. #define _LD_DEFS_H
  3. #define LIB_ANY -1
  4. #define LIB_DLL 0
  5. #define LIB_ELF 1
  6. #define LIB_ELF64 0x80
  7. #define LIB_ELF_LIBC5 2
  8. #define LIB_ELF_LIBC6 3
  9. #define LIB_ELF_LIBC0 4
  10. #if defined(__LDSO_PRELOAD_FILE_SUPPORT__) || defined(__LDSO_CACHE_SUPPORT__)
  11. #ifndef __LDSO_BASE_FILENAME__
  12. #define __LDSO_BASE_FILENAME__ "ld.so"
  13. #endif
  14. #define LDSO_BASE_PATH UCLIBC_RUNTIME_PREFIX "etc/" __LDSO_BASE_FILENAME__
  15. #ifdef __LDSO_PRELOAD_FILE_SUPPORT__
  16. #define LDSO_PRELOAD LDSO_BASE_PATH ".preload"
  17. #endif
  18. #ifdef __LDSO_CACHE_SUPPORT__
  19. #define LDSO_CONF LDSO_BASE_PATH ".conf"
  20. #define LDSO_CACHE LDSO_BASE_PATH ".cache"
  21. #define LDSO_CACHE_MAGIC "ld.so-"
  22. #define LDSO_CACHE_MAGIC_LEN (sizeof LDSO_CACHE_MAGIC -1)
  23. #define LDSO_CACHE_VER "1.7.0"
  24. #define LDSO_CACHE_VER_LEN (sizeof LDSO_CACHE_VER -1)
  25. typedef struct {
  26. char magic [LDSO_CACHE_MAGIC_LEN];
  27. char version [LDSO_CACHE_VER_LEN];
  28. int nlibs;
  29. } header_t;
  30. typedef struct {
  31. int flags;
  32. int sooffset;
  33. int liboffset;
  34. } libentry_t;
  35. #endif /* __LDSO_CACHE_SUPPORT__ */
  36. #endif
  37. #endif /* _LD_DEFS_H */