Source code pulled from OpenBSD for OpenNTPD. The place to contribute to this code is via the OpenBSD CVS tree.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
866 B

  1. /* $OpenBSD: link_elf.h,v 1.6 2006/02/06 16:51:50 jmc Exp $ */
  2. /*
  3. * Public domain.
  4. */
  5. #ifndef _LINK_ELF_H
  6. #define _LINK_ELF_H
  7. #include <elf_abi.h>
  8. #ifndef DT_PROCNUM
  9. #define DT_PROCNUM 0
  10. #endif
  11. /*
  12. * struct link_map is a part of the protocol between the debugger and
  13. * ld.so. ld.so may have additional fields in it's version of this
  14. * structure but those are ld.so private fields.
  15. */
  16. struct link_map {
  17. caddr_t l_addr; /* Base address of library */
  18. const char *l_name; /* Absolute path to library */
  19. void *l_ld; /* pointer to _DYNAMIC */
  20. struct link_map *l_next;
  21. struct link_map *l_prev;
  22. };
  23. struct dl_phdr_info {
  24. Elf_Addr dlpi_addr;
  25. const char *dlpi_name;
  26. const Elf_Phdr *dlpi_phdr;
  27. Elf_Half dlpi_phnum;
  28. };
  29. __BEGIN_DECLS
  30. int dl_iterate_phdr (int (*)(struct dl_phdr_info *, size_t, void *),
  31. void *);
  32. __END_DECLS
  33. #endif /* !_LINK_ELF_H */