16 #if !defined (_RTEMS_RTL_OBJ_H_) 17 #define _RTEMS_RTL_OBJ_H_ 31 #define RTEMS_RTL_FMT_ELF (1 << 0) 32 #define RTEMS_RTL_FMT_COMP (1 << 1) 33 #define RTEMS_RTL_FMT_PRIVATE (1 << 16) 90 #define RTEMS_RTL_OBJ_SECT_TEXT (1 << 0) 91 #define RTEMS_RTL_OBJ_SECT_CONST (1 << 1) 92 #define RTEMS_RTL_OBJ_SECT_DATA (1 << 2) 93 #define RTEMS_RTL_OBJ_SECT_BSS (1 << 3) 94 #define RTEMS_RTL_OBJ_SECT_EH (1 << 4) 95 #define RTEMS_RTL_OBJ_SECT_TLS (1 << 5) 96 #define RTEMS_RTL_OBJ_SECT_REL (1 << 6) 97 #define RTEMS_RTL_OBJ_SECT_RELA (1 << 7) 98 #define RTEMS_RTL_OBJ_SECT_SYM (1 << 8) 99 #define RTEMS_RTL_OBJ_SECT_STR (1 << 9) 100 #define RTEMS_RTL_OBJ_SECT_ALLOC (1 << 10 101 #define RTEMS_RTL_OBJ_SECT_LOAD (1 << 11) 102 #define RTEMS_RTL_OBJ_SECT_WRITE (1 << 12) 103 #define RTEMS_RTL_OBJ_SECT_EXEC (1 << 13) 104 #define RTEMS_RTL_OBJ_SECT_ZERO (1 << 14) 105 #define RTEMS_RTL_OBJ_SECT_LINK (1 << 15) 106 #define RTEMS_RTL_OBJ_SECT_CTOR (1 << 16) 107 #define RTEMS_RTL_OBJ_SECT_DTOR (1 << 17) 108 #define RTEMS_RTL_OBJ_SECT_LOCD (1 << 18) 109 #define RTEMS_RTL_OBJ_SECT_ARCH_ALLOC (1 << 19) 114 #define RTEMS_RTL_OBJ_SECT_TYPES (RTEMS_RTL_OBJ_SECT_TEXT | \ 115 RTEMS_RTL_OBJ_SECT_CONST | \ 116 RTEMS_RTL_OBJ_SECT_DATA | \ 117 RTEMS_RTL_OBJ_SECT_BSS | \ 118 RTEMS_RTL_OBJ_SECT_TLS | \ 119 RTEMS_RTL_OBJ_SECT_EH) 166 #define RTEMS_RTL_OBJ_LOCKED (1 << 0) 168 #define RTEMS_RTL_OBJ_UNRESOLVED (1 << 1) 170 #define RTEMS_RTL_OBJ_BASE (1 << 2) 171 #define RTEMS_RTL_OBJ_RELOC_TAG (1 << 3) 173 #define RTEMS_RTL_OBJ_DEP_VISITED (1 << 4) 174 #define RTEMS_RTL_OBJ_CTOR_RUN (1 << 5) 265 static inline const char* rtems_rtl_obj_fname (
const rtems_rtl_obj* obj)
276 static inline bool rtems_rtl_obj_fname_valid (
const rtems_rtl_obj* obj)
287 static inline const char* rtems_rtl_obj_oname (
const rtems_rtl_obj* obj)
298 static inline bool rtems_rtl_obj_oname_valid (
const rtems_rtl_obj* obj)
309 static inline const char* rtems_rtl_obj_aname (
const rtems_rtl_obj* obj)
320 static inline bool rtems_rtl_obj_aname_valid (
const rtems_rtl_obj* obj)
331 static inline bool rtems_rtl_obj_text_inside (
const rtems_rtl_obj* obj,
348 static inline size_t rtems_rtl_obj_align (
size_t offset,
351 if ((alignment > 1) && ((offset & (alignment - 1)) != 0))
352 offset = (offset + alignment) & ~(alignment - 1);
363 static inline bool rtems_rtl_obj_has_symbol (
const rtems_rtl_obj* obj,
377 static inline bool rtems_rtl_obj_has_tramp_space (
const rtems_rtl_obj* obj,
390 static inline size_t rtems_rtl_obj_trampoline_slots (
const rtems_rtl_obj* obj)
402 static inline size_t rtems_rtl_obj_trampolines (
const rtems_rtl_obj* obj)
bool rtems_rtl_obj_dtors_to_run(rtems_rtl_obj *obj)
Definition: rtl-obj.c:1309
Definition: rtl-unresolved.h:108
bool rtems_rtl_obj_find_file(rtems_rtl_obj *obj, const char *name)
Definition: rtl-obj.c:385
void rtems_rtl_obj_run_dtors(rtems_rtl_obj *obj)
Definition: rtl-obj.c:1315
rtems_rtl_obj_sym * global_table
Definition: rtl-obj.h:204
void * text_base
Definition: rtl-obj.h:208
uint32_t rtems_rtl_obj_bss_alignment(const rtems_rtl_obj *obj)
Definition: rtl-obj.c:812
bool rtems_rtl_obj_free(rtems_rtl_obj *obj)
Definition: rtl-obj.c:106
rtems_rtl_loader_sig signature
Definition: rtl-obj.h:84
const char * name
Definition: rtl-obj.h:130
rtems_rtl_obj * rtems_rtl_obj_alloc(void)
Definition: rtl-obj.c:74
void * base
Definition: rtl-obj.h:138
void rtems_rtl_obj_dec_reference(rtems_rtl_obj *obj)
Definition: rtl-obj.c:1357
bool rtems_rtl_obj_ctors_to_run(rtems_rtl_obj *obj)
Definition: rtl-obj.c:1297
rtems_rtl_loader_format *(* rtems_rtl_loader_sig)(void)
Definition: rtl-obj.h:74
bool rtems_rtl_obj_add_section(rtems_rtl_obj *obj, int section, const char *name, size_t size, off_t offset, uint32_t alignment, int link, int info, uint32_t flags)
Definition: rtl-obj.c:425
bool rtems_rtl_obj_orphaned(rtems_rtl_obj *obj)
Definition: rtl-obj.c:1364
bool(* rtems_rtl_loader_load)(rtems_rtl_obj *obj, int fd)
Definition: rtl-obj.h:62
rtems_rtl_obj_sect * rtems_rtl_obj_find_section(const rtems_rtl_obj *obj, const char *name)
Definition: rtl-obj.c:504
bool rtems_rtl_parse_name(const char *name, const char **aname, const char **oname, off_t *ooffset)
Definition: rtl-obj.c:202
Definition: rtl-obj.h:183
RTEMS Run-Time Linker Object File Symbol Table.
size_t size
Definition: rtl-obj.h:131
#define RTEMS_RTL_OBJ_SECT_ARCH_ALLOC
Definition: rtl-obj.h:109
void * trampoline
Definition: rtl-obj.h:231
rtems_rtl_loader_unload unload
Definition: rtl-obj.h:83
bool(* rtems_rtl_loader_unload)(rtems_rtl_obj *obj)
Definition: rtl-obj.h:68
uint32_t rtems_rtl_obj_const_alignment(const rtems_rtl_obj *obj)
Definition: rtl-obj.c:771
bool rtems_rtl_obj_unload(rtems_rtl_obj *obj)
Definition: rtl-obj.c:1433
void rtems_rtl_obj_erase_trampoline(rtems_rtl_obj *obj)
Definition: rtl-obj.c:597
size_t tramp_size
Definition: rtl-obj.h:233
rtems_rtl_obj_sect * rtems_rtl_obj_find_section_by_mask(const rtems_rtl_obj *obj, int index, uint32_t mask)
Definition: rtl-obj.c:567
bool rtems_rtl_obj_relocate(rtems_rtl_obj *obj, int fd, rtems_rtl_obj_sect_handler handler, void *data)
Definition: rtl-obj.c:818
size_t rtems_rtl_obj_data_size(const rtems_rtl_obj *obj)
Definition: rtl-obj.c:792
bool rtems_rtl_obj_alloc_dependents(rtems_rtl_obj *obj, size_t dependents)
Definition: rtl-obj.c:603
bool rtems_rtl_obj_load(rtems_rtl_obj *obj)
Definition: rtl-obj.c:1372
void rtems_rtl_obj_synchronize_cache(rtems_rtl_obj *obj)
Definition: rtl-obj.c:876
size_t rtems_rtl_obj_eh_size(const rtems_rtl_obj *obj)
Definition: rtl-obj.c:785
bool(* rtems_rtl_obj_sect_handler)(rtems_rtl_obj *obj, int fd, rtems_rtl_obj_sect *sect, void *data)
Definition: rtl-obj.h:257
bool rtems_rtl_obj_load_symbols(rtems_rtl_obj *obj, int fd, rtems_rtl_obj_sect_handler handler, void *data)
Definition: rtl-obj.c:910
rtems_chain_node node
Definition: rtl-obj.h:151
void * tramp_brk
Definition: rtl-obj.h:235
bool(* rtems_rtl_loader_check)(rtems_rtl_obj *obj, int fd)
Definition: rtl-obj.h:56
bool rtems_rtl_obj_remove_dependencies(rtems_rtl_obj *obj)
Definition: rtl-obj.c:694
void rtems_rtl_obj_run_ctors(rtems_rtl_obj *obj)
Definition: rtl-obj.c:1303
uint32_t rtems_rtl_obj_text_alignment(const rtems_rtl_obj *obj)
Definition: rtl-obj.c:757
int load_order
Definition: rtl-obj.h:140
bool rtems_rtl_obj_load_sections(rtems_rtl_obj *obj, int fd, rtems_rtl_obj_sect_handler handler, void *data)
Definition: rtl-obj.c:1227
void rtems_rtl_obj_erase_dependents(rtems_rtl_obj *obj)
Definition: rtl-obj.c:627
int info
Definition: rtl-obj.h:136
size_t tramps_size
Definition: rtl-obj.h:234
size_t rtems_rtl_obj_bss_size(const rtems_rtl_obj *obj)
Definition: rtl-obj.c:806
uint32_t alignment
Definition: rtl-obj.h:134
rtems_chain_node node
Definition: rtl-obj.h:128
int link(const char *path1, const char *path2)
Definition: link.c:28
size_t dependents
Definition: rtl-obj.h:152
Definition: rtl-obj.h:149
bool rtems_rtl_obj_iterate_dependents(rtems_rtl_obj *obj, rtems_rtl_obj_depends_iterator iterator, void *data)
Definition: rtl-obj.c:727
rtems_rtl_loader_check check
Definition: rtl-obj.h:81
size_t rtems_rtl_obj_get_reference(rtems_rtl_obj *obj)
Definition: rtl-obj.c:1345
Definition: link_elf.h:41
const char * fname
Definition: rtl-obj.h:190
uint32_t flags
Definition: rtl-obj.h:137
size_t rtems_rtl_obj_text_size(const rtems_rtl_obj *obj)
Definition: rtl-obj.c:750
bool rtems_rtl_obj_unresolved(rtems_rtl_obj *obj)
Definition: rtl-obj.c:171
bool(* rtems_rtl_obj_depends_iterator)(rtems_rtl_obj *obj, rtems_rtl_obj *dependent, void *data)
Definition: rtl-obj.h:159
size_t global_syms
Definition: rtl-obj.h:205
bool rtems_rtl_obj_relocate_unresolved(rtems_rtl_unresolv_reloc *reloc, rtems_rtl_obj_sym *sym)
Definition: rtl-elf.c:565
struct rtems_rtl_loader_table rtems_rtl_loader_table
struct rtems_rtl_loader_format rtems_rtl_loader_format
Definition: rtl-obj.h:126
const char * oname
Definition: rtl-obj.h:191
int section
Definition: rtl-obj.h:129
uint32_t rtems_rtl_obj_data_alignment(const rtems_rtl_obj *obj)
Definition: rtl-obj.c:799
rtems_rtl_loader_load load
Definition: rtl-obj.h:82
size_t rtems_rtl_obj_const_size(const rtems_rtl_obj *obj)
Definition: rtl-obj.c:764
Definition: mmu-config.c:40
uint32_t rtems_rtl_obj_eh_alignment(const rtems_rtl_obj *obj)
Definition: rtl-obj.c:778
unsigned size
Definition: tte.h:74
RTEMS Run-Time Linker Object File Unresolved Relocations Table.
int link
Definition: rtl-obj.h:135
rtems_rtl_obj * depends[]
Definition: rtl-obj.h:153
off_t offset
Definition: rtl-obj.h:132
rtems_rtl_obj_sect * rtems_rtl_obj_find_section_by_index(const rtems_rtl_obj *obj, int index)
Definition: rtl-obj.c:532
bool rtems_rtl_obj_alloc_trampoline(rtems_rtl_obj *obj)
Definition: rtl-obj.c:583
void rtems_rtl_obj_erase_sections(rtems_rtl_obj *obj)
Definition: rtl-obj.c:464
void rtems_rtl_obj_inc_reference(rtems_rtl_obj *obj)
Definition: rtl-obj.c:1351
bool rtems_rtl_obj_add_dependent(rtems_rtl_obj *obj, rtems_rtl_obj *dependent)
Definition: rtl-obj.c:641
#define NULL
Requests a GPIO pin group configuration.
Definition: bestcomm_api.h:77
size_t text_size
Definition: rtl-obj.h:210
bool rtems_rtl_obj_alloc_sections(rtems_rtl_obj *obj, int fd, rtems_rtl_obj_sect_handler handler, void *data)
Definition: rtl-obj.c:1053
const char * aname
Definition: rtl-obj.h:193