1 /* $NetBSD: link_elf.h,v 1.10 2010/10/16 10:27:06 skrll Exp $ */
7 #include <sys/exec_elf.h>
9 typedef struct link_map
{
10 caddr_t l_addr
; /* Base Address of library */
12 caddr_t l_offs
; /* Load Offset of library */
14 const char *l_name
; /* Absolute Path to Library */
15 void *l_ld
; /* Pointer to .dynamic in memory */
16 struct link_map
*l_next
; /* linked list of of mapped libs */
17 struct link_map
*l_prev
;
21 * This only exists for GDB.
24 int r_version
; /* not used */
25 struct link_map
*r_map
; /* list of loaded images */
26 void (*r_brk
)(void); /* pointer to break point */
28 RT_CONSISTENT
, /* things are stable */
29 RT_ADD
, /* adding a shared library */
30 RT_DELETE
/* removing a shared library */
36 Elf_Addr dlpi_addr
; /* module relocation base */
37 const char *dlpi_name
; /* module name */
38 const Elf_Phdr
*dlpi_phdr
; /* pointer to module's phdr */
39 Elf_Half dlpi_phnum
; /* number of entries in phdr */
40 unsigned long long int dlpi_adds
; /* total # of loads */
41 unsigned long long int dlpi_subs
; /* total # of unloads */
42 size_t dlpi_tls_modid
;
48 int dl_iterate_phdr(int (*)(struct dl_phdr_info
*, size_t, void *),
53 #endif /* _LINK_ELF_H_ */