RTEMS: cpukit/include/rtems/rtl/rtl-unresolved.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
rtl-unresolved.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT (c) 2012, 2019 Chris Johns <chrisj@rtems.org>
3 *
4 * The license and distribution terms for this file may be
5 * found in the file LICENSE in this distribution or at
6 * http://www.rtems.org/license/LICENSE.
7 */
52#if !defined (_RTEMS_RTL_UNRESOLVED_H_)
53#define _RTEMS_RTL_UNRESOLVED_H_
54
55#include <rtems.h>
56#include <rtems/chain.h>
57#include "rtl-obj-fwd.h"
58
59#ifdef __cplusplus
60extern "C" {
61#endif /* __cplusplus */
62
67 typedef uint32_t rtems_rtl_word;
68
72 typedef enum rtems_rtl_unresolved_rtype
73{
74 rtems_rtl_unresolved_empty = 0,
75 rtems_rtl_unresolved_symbol = 1,
76 rtems_rtl_unresolved_reloc = 2,
77 rtems_rtl_trampoline_reloc = 3
78} rtems_rtl_unresolved_rtype;
79
83#define RTEMS_RTL_UNRESOLV_SYM_SEARCH_ARCHIVE (1 << 0)
84#define RTEMS_RTL_UNRESOLV_SYM_HAS_ERROR (1 << 1)
95 typedef struct rtems_rtl_unresolv_symbol
96{
97 uint16_t refs;
98 uint16_t flags;
99 uint16_t length;
100 const char name[];
101} rtems_rtl_unresolv_symbol;
102
107 typedef struct rtems_rtl_unresolv_reloc
108{
109 rtems_rtl_obj* obj;
110 uint16_t flags;
111 uint16_t name;
112 uint16_t sect;
113 rtems_rtl_word rel[3];
114} rtems_rtl_unresolv_reloc;
115
119 typedef struct rtems_rtl_tramp_reloc
120{
121 rtems_rtl_obj* obj;
122 uint16_t flags;
123 uint16_t sect;
124 rtems_rtl_word symvalue;
125 rtems_rtl_word rel[3];
126} rtems_rtl_tramp_reloc;
127
131 typedef struct rtems_rtl_unresolv_rec
132{
133 rtems_rtl_unresolved_rtype type;
134 union
135 {
136 rtems_rtl_unresolv_symbol name;
137 rtems_rtl_unresolv_reloc reloc;
138 rtems_rtl_tramp_reloc tramp;
139 } rec;
140} rtems_rtl_unresolv_rec;
141
145 typedef struct rtems_rtl_unresolv_block
146{
147 rtems_chain_node link;
148 uint32_t recs;
149 rtems_rtl_unresolv_rec rec[];
150} rtems_rtl_unresolv_block;
151
155 typedef struct rtems_rtl_unresolved
156{
157 uint32_t marker;
158 size_t block_recs;
159 rtems_chain_control blocks;
160} rtems_rtl_unresolved;
161
170 typedef bool rtems_rtl_unresolved_iterator (rtems_rtl_unresolv_rec* rec,
171 void* data);
172
182bool rtems_rtl_unresolved_table_open (rtems_rtl_unresolved* unresolved,
183 size_t block_records);
184
190void rtems_rtl_unresolved_table_close (rtems_rtl_unresolved* unresolved);
191
195bool rtems_rtl_unresolved_iterate (rtems_rtl_unresolved_iterator iterator,
196 void* data);
197
210bool rtems_rtl_unresolved_add (rtems_rtl_obj* obj,
211 const uint16_t flags,
212 const char* name,
213 const uint16_t sect,
214 const rtems_rtl_word* rel);
215
219void rtems_rtl_unresolved_resolve (void);
220
229 bool rtems_rtl_unresolved_remove (rtems_rtl_obj* obj,
230 const char* name,
231 const uint16_t sect,
232 const rtems_rtl_word* rel);
233
238void rtems_rtl_unresolved_set_archive_search (void);
239
243void rtems_rtl_unresolved_dump (void);
244
245#ifdef __cplusplus
246}
247#endif /* __cplusplus */
248
249#endif
chain.h
Chain API.
rtems.h
rtl-obj-fwd.h
RTEMS Run-Time Linker ELF Headers.
rtems_rtl_unresolved_iterate
bool rtems_rtl_unresolved_iterate(rtems_rtl_unresolved_iterator iterator, void *data)
Definition: rtl-unresolved.c:509
rtems_rtl_unresolved_resolve
void rtems_rtl_unresolved_resolve(void)
Definition: rtl-unresolved.c:636
rtems_rtl_unresolved_rtype
rtems_rtl_unresolved_rtype
Definition: rtl-unresolved.h:73
rtems_rtl_unresolved_reloc
@ rtems_rtl_unresolved_reloc
Definition: rtl-unresolved.h:76
rtems_rtl_unresolved_symbol
@ rtems_rtl_unresolved_symbol
Definition: rtl-unresolved.h:75
rtems_rtl_unresolved_empty
@ rtems_rtl_unresolved_empty
Definition: rtl-unresolved.h:74
rtems_rtl_trampoline_reloc
@ rtems_rtl_trampoline_reloc
Definition: rtl-unresolved.h:77
rtems_rtl_word
uint32_t rtems_rtl_word
Definition: rtl-unresolved.h:67
rtems_rtl_unresolved_dump
void rtems_rtl_unresolved_dump(void)
Definition: rtl-unresolved.c:808
rtems_rtl_unresolved_set_archive_search
void rtems_rtl_unresolved_set_archive_search(void)
Definition: rtl-unresolved.c:816
rtems_rtl_unresolved_iterator
bool rtems_rtl_unresolved_iterator(rtems_rtl_unresolv_rec *rec, void *data)
Definition: rtl-unresolved.h:170
rtems_rtl_unresolved_add
bool rtems_rtl_unresolved_add(rtems_rtl_obj *obj, const uint16_t flags, const char *name, const uint16_t sect, const rtems_rtl_word *rel)
Definition: rtl-unresolved.c:535
rtems_rtl_unresolved_remove
bool rtems_rtl_unresolved_remove(rtems_rtl_obj *obj, const char *name, const uint16_t sect, const rtems_rtl_word *rel)
rtems_rtl_unresolved_table_close
void rtems_rtl_unresolved_table_close(rtems_rtl_unresolved *unresolved)
Definition: rtl-unresolved.c:497
rtems_rtl_unresolved_table_open
bool rtems_rtl_unresolved_table_open(rtems_rtl_unresolved *unresolved, size_t block_records)
Definition: rtl-unresolved.c:487
Chain_Node_struct
Definition: chain.h:68
rtems_rtl_obj
Definition: rtl-obj.h:181
rtems_rtl_tramp_reloc
Definition: rtl-unresolved.h:120
rtems_rtl_tramp_reloc::symvalue
rtems_rtl_word symvalue
Definition: rtl-unresolved.h:124
rtems_rtl_tramp_reloc::sect
uint16_t sect
Definition: rtl-unresolved.h:123
rtems_rtl_tramp_reloc::obj
rtems_rtl_obj * obj
Definition: rtl-unresolved.h:121
rtems_rtl_tramp_reloc::flags
uint16_t flags
Definition: rtl-unresolved.h:122
rtems_rtl_tramp_reloc::rel
rtems_rtl_word rel[3]
Definition: rtl-unresolved.h:125
rtems_rtl_unresolv_block
Definition: rtl-unresolved.h:146
rtems_rtl_unresolv_block::recs
uint32_t recs
Definition: rtl-unresolved.h:148
rtems_rtl_unresolv_block::rec
rtems_rtl_unresolv_rec rec[]
Definition: rtl-unresolved.h:149
rtems_rtl_unresolv_block::link
rtems_chain_node link
Definition: rtl-unresolved.h:147
rtems_rtl_unresolv_rec
Definition: rtl-unresolved.h:132
rtems_rtl_unresolv_rec::name
rtems_rtl_unresolv_symbol name
Definition: rtl-unresolved.h:136
rtems_rtl_unresolv_rec::tramp
rtems_rtl_tramp_reloc tramp
Definition: rtl-unresolved.h:138
rtems_rtl_unresolv_rec::reloc
rtems_rtl_unresolv_reloc reloc
Definition: rtl-unresolved.h:137
rtems_rtl_unresolv_reloc
Definition: rtl-unresolved.h:108
rtems_rtl_unresolv_reloc::obj
rtems_rtl_obj * obj
Definition: rtl-unresolved.h:109
rtems_rtl_unresolv_reloc::flags
uint16_t flags
Definition: rtl-unresolved.h:110
rtems_rtl_unresolv_reloc::name
uint16_t name
Definition: rtl-unresolved.h:111
rtems_rtl_unresolv_reloc::rel
rtems_rtl_word rel[3]
Definition: rtl-unresolved.h:113
rtems_rtl_unresolv_reloc::sect
uint16_t sect
Definition: rtl-unresolved.h:112
rtems_rtl_unresolv_symbol
Definition: rtl-unresolved.h:96
rtems_rtl_unresolv_symbol::flags
uint16_t flags
Definition: rtl-unresolved.h:98
rtems_rtl_unresolv_symbol::length
uint16_t length
Definition: rtl-unresolved.h:99
rtems_rtl_unresolv_symbol::refs
uint16_t refs
Definition: rtl-unresolved.h:97
rtems_rtl_unresolved
Definition: rtl-unresolved.h:156
rtems_rtl_unresolved::blocks
rtems_chain_control blocks
Definition: rtl-unresolved.h:159
rtems_rtl_unresolved::marker
uint32_t marker
Definition: rtl-unresolved.h:157
rtems_rtl_unresolved::block_recs
size_t block_recs
Definition: rtl-unresolved.h:158
Chain_Control
Definition: chain.h:86