RTEMS 6.1-rc6
Loading...
Searching...
No Matches
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>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20enum sections
21{
22 rap_text = 0,
23 rap_const = 1,
24 rap_ctor = 2,
25 rap_dtor = 3,
26 rap_data = 4,
27 rap_bss = 5,
28 rap_secs = 6
29};
30
34typedef struct
35{
36 const char* name;
37 uint32_t offset;
38 uint32_t size;
39 uint32_t rap_id;
41
45struct link_map {
46 const char* name;
47 uint32_t sec_num;
49 uint32_t* sec_addr[rap_secs];
50 uint32_t rpathlen;
51 char* rpath;
52 struct link_map* l_next;
53 struct link_map* l_prev;
54};
55
59struct r_debug {
60 int r_version; /* not used */
61 struct link_map *r_map; /* list of loaded images */
62 enum {
63 RT_CONSISTENT, /* things are stable */
64 RT_ADD, /* adding a shared library */
65 RT_DELETE /* removing a shared library */
66 } r_state;
67};
68
69/*
70 * stub function. It is empty.
71 */
72void _rtld_debug_state (void);
73
74/*
75 * add link map to the list.
76 */
77int _rtld_linkmap_add (rtems_rtl_obj* obj);
78
79/*
80 * Remove link map from the list.
81 */
82void _rtld_linkmap_delete (rtems_rtl_obj* obj);
83
84#ifdef __cplusplus
85}
86#endif
87#endif /* _LINK_ELF_H_ */
RTEMS Run-Time Linker ELF Headers.
Definition: link_elf.h:59
Definition: rtl-obj.h:200
Definition: link_elf.h:35
const char * name
Definition: link_elf.h:36
uint32_t size
Definition: link_elf.h:38
uint32_t rap_id
Definition: link_elf.h:39
uint32_t offset
Definition: link_elf.h:37