RTEMS 5.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
rtl.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT (c) 2012, 2018 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 */
8
19#if !defined (_RTEMS_RTL_H_)
20#define _RTEMS_RTL_H_
21
22#include <link.h>
23#include <rtems/chain.h>
24#include <rtems/thread.h>
25
28#include <rtems/rtl/rtl-fwd.h>
29#include <rtems/rtl/rtl-obj.h>
32#include <rtems/rtl/rtl-sym.h>
34
35#ifdef __cplusplus
36extern "C" {
37#endif /* __cplusplus */
38
59#ifdef __STDC__
60#define RTL_XGLUE(a,b) a##b
61#else
62#define RTL_XGLUE(a,b) ab
63#endif
64
65#define RTL_GLUE(a,b) RTL_XGLUE(a,b)
66
70#define RTEMS_RTL_SYMS_GLOBAL_BUCKETS (32)
71
75#define RTEMS_RTL_UNRESOLVED_BLOCK_SIZE (256)
76
80#define RTEMS_RTL_DEPENDENCY_BLOCK_SIZE (16)
81
85extern struct r_debug _rtld_debug;
86
91void _rtld_debug_state (void);
92
96typedef void (*rtems_rtl_cdtor)(void);
97
107{
108 rtems_recursive_mutex lock;
112 const char* paths;
122 char last_error[64];
123};
124
132
141
149const char* rtems_rtl_last_error_unprotected (void);
150
159
167
176
184
197 rtems_rtl_obj_cache** strings,
198 rtems_rtl_obj_cache** relocs);
199
204
215 rtems_rtl_obj_cache* cache,
216 int fd,
217 int compression,
218 off_t offset);
219
228void rtems_rtl_obj_update_flags (uint32_t clear, uint32_t set);
229
238
242void rtems_rtl_unlock (void);
243
254
262rtems_rtl_obj* rtems_rtl_find_obj (const char* name);
263
272
304rtems_rtl_obj* rtems_rtl_load_object (const char* name, int mode);
305
316
325rtems_rtl_obj* rtems_rtl_load (const char* name, int mode);
326
338
349int rtems_rtl_get_error (char* message, size_t max_message);
350
358bool rtems_rtl_path_append (const char* path);
359
368bool rtems_rtl_path_prepend (const char* path);
369
378void rtems_rtl_base_sym_global_add (const unsigned char* esyms,
379 unsigned int count);
380
391
392#ifdef __cplusplus
393}
394#endif /* __cplusplus */
395
396#endif
Chain API.
RTEMS Run-Time Linker Allocator.
RTEMS Run-Time Linker Archive.
RTEMS Run-Time Linker ELF Headers.
RTEMS Run-Time Linker Object File cache buffers a section of the object file in a buffer to localise ...
RTEMS Run-Time Linker Object File Compression manages a compressed stream of data.
RTEMS Run-Time Linker Object Support.
RTEMS Run-Time Linker Object File Symbol Table.
RTEMS Run-Time Linker Object File Unresolved Relocations Table.
rtems_rtl_obj * rtems_rtl_baseimage(void)
Definition: rtl.c:858
bool rtems_rtl_unload_object(rtems_rtl_obj *obj)
Definition: rtl.c:632
void rtems_rtl_obj_decompress(rtems_rtl_obj_comp **decomp, rtems_rtl_obj_cache *cache, int fd, int compression, off_t offset)
Definition: rtl.c:357
void _rtld_debug_state(void)
Definition: rtl-debugger.c:38
void(* rtems_rtl_cdtor)(void)
Definition: rtl.h:96
const char * rtems_rtl_last_error_unprotected(void)
Definition: rtl.c:269
bool rtems_rtl_unload(rtems_rtl_obj *obj)
Definition: rtl.c:666
rtems_rtl_obj * rtems_rtl_find_obj(const char *name)
Definition: rtl.c:442
rtems_rtl_obj * rtems_rtl_check_handle(void *handle)
Definition: rtl.c:422
rtems_chain_control * rtems_rtl_pending_unprotected(void)
Definition: rtl.c:288
int rtems_rtl_get_error(char *message, size_t max_message)
Definition: rtl-error.c:41
rtems_rtl_data * rtems_rtl_lock(void)
Definition: rtl.c:405
rtems_rtl_obj * rtems_rtl_load(const char *name, int mode)
Definition: rtl.c:569
rtems_rtl_symbols * rtems_rtl_global_symbols(void)
Definition: rtl.c:258
rtems_chain_control * rtems_rtl_objects_unprotected(void)
Definition: rtl.c:277
void rtems_rtl_base_sym_global_add(const unsigned char *esyms, unsigned int count)
Definition: rtl.c:840
rtems_rtl_obj * rtems_rtl_find_obj_with_symbol(const rtems_rtl_obj_sym *sym)
Definition: rtl.c:478
bool rtems_rtl_path_append(const char *path)
Definition: rtl.c:828
rtems_rtl_unresolved * rtems_rtl_unresolved_unprotected(void)
Definition: rtl.c:299
rtems_rtl_data * rtems_rtl_data_unprotected(void)
Definition: rtl.c:252
rtems_rtl_archives * rtems_rtl_archives_unprotected(void)
Definition: rtl.c:310
bool rtems_rtl_path_prepend(const char *path)
Definition: rtl.c:834
void rtems_rtl_obj_caches(rtems_rtl_obj_cache **symbols, rtems_rtl_obj_cache **strings, rtems_rtl_obj_cache **relocs)
Definition: rtl.c:321
void rtems_rtl_obj_update_flags(uint32_t clear, uint32_t set)
Definition: rtl.c:393
void rtems_rtl_obj_caches_flush(void)
Definition: rtl.c:346
struct r_debug _rtld_debug
Definition: rtl-debugger.c:35
rtems_rtl_obj * rtems_rtl_load_object(const char *name, int mode)
Definition: rtl.c:503
void rtems_rtl_unlock(void)
Definition: rtl.c:416
Definition: media-server.c:33
Definition: link_elf.h:59
Definition: rtl-allocator.h:91
Definition: rtl-archive.h:103
Definition: rtl.h:107
rtems_recursive_mutex lock
Definition: rtl.h:108
char last_error[64]
Definition: rtl.h:122
rtems_rtl_symbols globals
Definition: rtl.h:113
rtems_chain_control pending
Definition: rtl.h:111
rtems_rtl_obj_comp decomp
Definition: rtl.h:120
rtems_rtl_obj_cache symbols
Definition: rtl.h:117
rtems_rtl_archives archives
Definition: rtl.h:114
rtems_rtl_unresolved unresolved
Definition: rtl.h:115
rtems_rtl_alloc_data allocator
Definition: rtl.h:109
const char * paths
Definition: rtl.h:112
int last_errno
Definition: rtl.h:121
rtems_rtl_obj_cache strings
Definition: rtl.h:118
rtems_chain_control objects
Definition: rtl.h:110
rtems_rtl_obj * base
Definition: rtl.h:116
rtems_rtl_obj_cache relocs
Definition: rtl.h:119
Definition: rtl-obj-cache.h:54
Definition: rtl-obj-comp.h:47
Definition: rtl-sym.h:30
Definition: rtl-obj.h:181
Definition: rtl-sym.h:41
Definition: rtl-unresolved.h:156
Definition: chain.h:86