source: rtems/cpukit/include/link_elf.h @ f59d435d

5
Last change on this file since f59d435d was f59d435d, checked in by Chris Johns <chrisj@…>, on 04/12/18 at 07:46:49

libdl: Remove _t from all structures as this is reserved for the standards

  • Property mode set to 100644
File size: 1.9 KB
Line 
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
16enum 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
27/**
28 * Object details.
29 */
30typedef struct
31{
32  const char* name;   /**< Section name. */
33  uint32_t    offset; /**< The offset in the elf file. */
34  uint32_t    size;   /**< The size of the section. */
35  uint32_t    rap_id; /**< Which obj does this section belongs to. */
36}section_detail;
37
38/**
39 * link map structure will be used for GDB support.
40 */
41struct link_map {
42  const char*       name;                 /**< Name of the obj. */
43  uint32_t          sec_num;              /**< The count of section. */
44  section_detail*   sec_detail;           /**< The section details. */
45  uint32_t*         sec_addr[rap_secs];   /**< The RAP section addr. */
46  uint32_t          rpathlen;             /**< The length of the path. */
47  char*             rpath;                /**< The path of object files. */
48  struct link_map*  l_next;               /**< Linked list of mapped libs. */
49  struct link_map*  l_prev;
50};
51
52/**
53 * r_debug is used to manage the debug related structures.
54 */
55struct 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 */
68void _rtld_debug_state (void);
69
70/*
71 * add link map to the list.
72 */
73int _rtld_linkmap_add (rtems_rtl_obj* obj);
74
75/*
76 * Remove link map from the list.
77 */
78void _rtld_linkmap_delete (rtems_rtl_obj* obj);
79#endif  /* _LINK_ELF_H_ */
Note: See TracBrowser for help on using the repository browser.