config.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifdef DEBUG
  2. # define LDSO_IMAGE "../ld-so/ld.so"
  3. # define LDSO_CONF "../util/ld.so.conf"
  4. # define LDSO_CACHE "../util/ld.so.cache"
  5. # define LDSO_PRELOAD "../util/ld.so.preload"
  6. # define LDDSTUB "../util/lddstub"
  7. #else
  8. # define LDSO_IMAGE UCLIBC_INSTALL_DIR"/lib/ld.so"
  9. # define LDSO_CONF UCLIBC_INSTALL_DIR"/etc/ld.so.conf"
  10. # define LDSO_CACHE UCLIBC_INSTALL_DIR"/etc/ld.so.cache"
  11. # define LDSO_PRELOAD UCLIBC_INSTALL_DIR"/etc/ld.so.preload"
  12. # define LDDSTUB UCLIBC_INSTALL_DIR"/usr/lib/lddstub"
  13. #endif
  14. #define LDD_ARGV0 "__LDD_ARGV0"
  15. #define DIR_SEP ":, \t\n"
  16. #define MAX_DIRS 32
  17. typedef void (*loadptr)(int func, ...);
  18. typedef void (*callbackptr)(int ver, int nlibs, char **libs,
  19. int nmods, char **mods);
  20. #define CALLBACK_VER 1
  21. #define LIB_ANY -1
  22. #define LIB_DLL 0
  23. #define LIB_ELF 1
  24. #define LIB_ELF_LIBC5 2
  25. #define LIB_ELF_LIBC6 3
  26. #define LIB_ELF64 0x80
  27. #define FUNC_VERS 0
  28. #define FUNC_LDD 1
  29. #define FUNC_LINK 2
  30. #define FUNC_LINK_AND_CALLBACK 3
  31. #define LDSO_CACHE_MAGIC "ld.so-"
  32. #define LDSO_CACHE_MAGIC_LEN (sizeof LDSO_CACHE_MAGIC -1)
  33. #define LDSO_CACHE_VER "1.7.0"
  34. #define LDSO_CACHE_VER_LEN (sizeof LDSO_CACHE_VER -1)
  35. typedef struct {
  36. char magic [LDSO_CACHE_MAGIC_LEN];
  37. char version [LDSO_CACHE_VER_LEN];
  38. int nlibs;
  39. } header_t;
  40. typedef struct {
  41. int flags;
  42. int sooffset;
  43. int liboffset;
  44. } libentry_t;