dl-defs.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. /* should we include features.h? */
  11. #if defined(__LDSO_PRELOAD_FILE_SUPPORT__) || defined(__LDSO_CACHE_SUPPORT__)
  12. #define LDSO_BASE_PATH UCLIBC_RUNTIME_PREFIX "etc/" __LDSO_BASE_FILENAME__
  13. #ifdef __LDSO_PRELOAD_FILE_SUPPORT__
  14. #define LDSO_PRELOAD LDSO_BASE_PATH ".preload"
  15. #endif
  16. #ifdef __LDSO_CACHE_SUPPORT__
  17. #define LDSO_CONF LDSO_BASE_PATH ".conf"
  18. #define LDSO_CACHE LDSO_BASE_PATH ".cache"
  19. #define LDSO_CACHE_MAGIC "ld.so-"
  20. #define LDSO_CACHE_MAGIC_LEN (sizeof LDSO_CACHE_MAGIC -1)
  21. #define LDSO_CACHE_VER "1.7.0"
  22. #define LDSO_CACHE_VER_LEN (sizeof LDSO_CACHE_VER -1)
  23. typedef struct {
  24. char magic [LDSO_CACHE_MAGIC_LEN];
  25. char version [LDSO_CACHE_VER_LEN];
  26. int nlibs;
  27. } header_t;
  28. typedef struct {
  29. int flags;
  30. int sooffset;
  31. int liboffset;
  32. } libentry_t;
  33. #endif /* __LDSO_CACHE_SUPPORT__ */
  34. #endif
  35. #endif /* _LD_DEFS_H */