dl-defs.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * Copyright (C) 2000-2005 by Erik Andersen <andersen@codepoet.org>
  4. *
  5. * GNU Lesser General Public License version 2.1 or later.
  6. */
  7. #ifndef _LD_DEFS_H
  8. #define _LD_DEFS_H
  9. #define LIB_ANY -1
  10. #define LIB_DLL 0
  11. #define LIB_ELF 1
  12. #define LIB_ELF64 0x80
  13. #define LIB_ELF_LIBC5 2
  14. #define LIB_ELF_LIBC6 3
  15. #define LIB_ELF_LIBC0 4
  16. #if defined(__LDSO_PRELOAD_FILE_SUPPORT__) || defined(__LDSO_CACHE_SUPPORT__)
  17. #ifndef __LDSO_BASE_FILENAME__
  18. #define __LDSO_BASE_FILENAME__ "ld.so"
  19. #endif
  20. #define LDSO_BASE_PATH UCLIBC_RUNTIME_PREFIX "etc/" __LDSO_BASE_FILENAME__
  21. #ifdef __LDSO_PRELOAD_FILE_SUPPORT__
  22. #define LDSO_PRELOAD LDSO_BASE_PATH ".preload"
  23. #endif
  24. #ifdef __LDSO_CACHE_SUPPORT__
  25. #define LDSO_CONF LDSO_BASE_PATH ".conf"
  26. #define LDSO_CACHE LDSO_BASE_PATH ".cache"
  27. #define LDSO_CACHE_MAGIC "ld.so-"
  28. #define LDSO_CACHE_MAGIC_LEN (sizeof LDSO_CACHE_MAGIC -1)
  29. #define LDSO_CACHE_VER "1.7.0"
  30. #define LDSO_CACHE_VER_LEN (sizeof LDSO_CACHE_VER -1)
  31. typedef struct {
  32. char magic [LDSO_CACHE_MAGIC_LEN];
  33. char version [LDSO_CACHE_VER_LEN];
  34. int nlibs;
  35. } header_t;
  36. typedef struct {
  37. int flags;
  38. int sooffset;
  39. int liboffset;
  40. } libentry_t;
  41. #endif /* __LDSO_CACHE_SUPPORT__ */
  42. #endif
  43. #endif /* _LD_DEFS_H */