1 1.9 skrll /* $NetBSD: link_elf.h,v 1.9 2010/10/14 07:51:21 skrll Exp $ */ 2 1.5 thorpej 3 1.5 thorpej #ifndef _LINK_ELF_H_ 4 1.5 thorpej #define _LINK_ELF_H_ 5 1.1 cgd 6 1.1 cgd #include <sys/types.h> 7 1.3 jonathan 8 1.3 jonathan #include <machine/elf_machdep.h> 9 1.1 cgd 10 1.8 pooka typedef struct link_map { 11 1.4 christos caddr_t l_addr; /* Base Address of library */ 12 1.2 mhitch #ifdef __mips__ 13 1.4 christos caddr_t l_offs; /* Load Offset of library */ 14 1.2 mhitch #endif 15 1.4 christos const char *l_name; /* Absolute Path to Library */ 16 1.4 christos void *l_ld; /* Pointer to .dynamic in memory */ 17 1.4 christos struct link_map *l_next; /* linked list of of mapped libs */ 18 1.4 christos struct link_map *l_prev; 19 1.8 pooka } Link_map; 20 1.1 cgd 21 1.9 skrll /* 22 1.9 skrll * This only exists for GDB. 23 1.9 skrll */ 24 1.1 cgd struct r_debug { 25 1.4 christos int r_version; /* not used */ 26 1.4 christos struct link_map *r_map; /* list of loaded images */ 27 1.7 uwe void (*r_brk)(void); /* pointer to break point */ 28 1.1 cgd enum { 29 1.4 christos RT_CONSISTENT, /* things are stable */ 30 1.4 christos RT_ADD, /* adding a shared library */ 31 1.4 christos RT_DELETE /* removing a shared library */ 32 1.4 christos } r_state; 33 1.1 cgd }; 34 1.4 christos 35 1.5 thorpej #endif /* _LINK_ELF_H_ */ 36