link.h 1003 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef _LINK_H
  2. #define _LINK_H
  3. #include "elf.h"
  4. /* Header file that describes the internal data structures used by the
  5. * ELF dynamic linker. */
  6. struct link_map
  7. {
  8. /* These entries must be in this order to be compatible with the
  9. * interface used by gdb to obtain the list of symbols. */
  10. unsigned long l_addr; /* address at which object is mapped */
  11. char *l_name; /* full name of loaded object */
  12. Elf32_Dyn *l_ld; /* dynamic structure of object */
  13. struct link_map *l_next;
  14. struct link_map *l_prev;
  15. };
  16. /* The DT_DEBUG entry in the .dynamic section is given the address of
  17. * this structure. gdb can pick this up to obtain the correct list of
  18. * loaded modules. */
  19. struct r_debug
  20. {
  21. int r_version; /* debugging info version no */
  22. struct link_map *r_map; /* address of link_map */
  23. unsigned long r_brk; /* address of update routine */
  24. enum
  25. {
  26. RT_CONSISTENT,
  27. RT_ADD,
  28. RT_DELETE
  29. } r_state;
  30. unsigned long r_ldbase; /* base addr of ld.so */
  31. };
  32. #endif /* _LINK_H */