RTEMS  5.1
link_elf.h
1 /* $NetBSD: link_elf.h,v 1.8 2009/11/04 19:28:03 pooka Exp $ */
2 
3 /*
4  * This only exists for GDB.
5  */
6 
7 #ifndef _LINK_ELF_H_
8 #define _LINK_ELF_H_
9 
10 #include <sys/types.h>
11 
12 #include <machine/elf_machdep.h>
13 #include <stdint.h>
14 #include <rtems/rtl/rtl-obj-fwd.h>
15 
16 enum sections
17 {
18  rap_text = 0,
19  rap_const = 1,
20  rap_ctor = 2,
21  rap_dtor = 3,
22  rap_data = 4,
23  rap_bss = 5,
24  rap_secs = 6
25 };
26 
30 typedef struct
31 {
32  const char* name;
33  uint32_t offset;
34  uint32_t size;
35  uint32_t rap_id;
37 
41 struct link_map {
42  const char* name;
43  uint32_t sec_num;
45  uint32_t* sec_addr[rap_secs];
46  uint32_t rpathlen;
47  char* rpath;
48  struct link_map* l_next;
49  struct link_map* l_prev;
50 };
51 
55 struct r_debug {
56  int r_version; /* not used */
57  struct link_map *r_map; /* list of loaded images */
58  enum {
59  RT_CONSISTENT, /* things are stable */
60  RT_ADD, /* adding a shared library */
61  RT_DELETE /* removing a shared library */
62  } r_state;
63 };
64 
65 /*
66  * stub function. It is empty.
67  */
68 void _rtld_debug_state (void);
69 
70 /*
71  * add link map to the list.
72  */
73 int _rtld_linkmap_add (rtems_rtl_obj* obj);
74 
75 /*
76  * Remove link map from the list.
77  */
78 void _rtld_linkmap_delete (rtems_rtl_obj* obj);
79 #endif /* _LINK_ELF_H_ */
Definition: rtl-obj.h:183
Definition: link_elf.h:30
Definition: link_elf.h:55
uint32_t rap_id
Definition: link_elf.h:35
void _rtld_debug_state(void)
Definition: rtl-debugger.c:38
uint32_t size
Definition: link_elf.h:34
const char * name
Definition: link_elf.h:32
RTEMS Run-Time Linker ELF Headers.
uint32_t offset
Definition: link_elf.h:33