RTEMS CPU Kit with SuperCore
4.11.3
|
RTEMS Run-Time Linker Object Support. More...
#include <rtems.h>
#include <rtems/chain.h>
#include <rtems/rtl/rtl-sym.h>
#include <rtems/rtl/rtl-unresolved.h>
Go to the source code of this file.
Data Structures | |
struct | rtems_rtl_loader_format_s |
Loader format definition. More... | |
struct | rtems_rtl_loader_table_s |
Table for supported loadable formats. More... | |
struct | rtems_rtl_obj_sect_s |
An object file is made up of sections and the can be more than one of a specific type of sections. More... | |
struct | rtems_rtl_obj_s |
RTL Object. More... | |
Macros | |
#define | RTEMS_RTL_FMT_ELF (1 << 0) |
Loader format flags. | |
#define | RTEMS_RTL_FMT_COMP (1 << 1) |
#define | RTEMS_RTL_FMT_PRIVATE (1 << 16) |
#define | RTEMS_RTL_OBJ_SECT_TEXT (1 << 0) |
Flags for the various section types. More... | |
#define | RTEMS_RTL_OBJ_SECT_CONST (1 << 1) |
Section holds program text. More... | |
#define | RTEMS_RTL_OBJ_SECT_DATA (1 << 2) |
Section holds program data. More... | |
#define | RTEMS_RTL_OBJ_SECT_BSS (1 << 3) |
Section holds program bss. More... | |
#define | RTEMS_RTL_OBJ_SECT_EH (1 << 4) |
Section holds exception data. More... | |
#define | RTEMS_RTL_OBJ_SECT_REL (1 << 5) |
Section holds relocation records. More... | |
#define | RTEMS_RTL_OBJ_SECT_RELA (1 << 6) |
Section holds relocation addend records. More... | |
#define | RTEMS_RTL_OBJ_SECT_SYM (1 << 7) |
Section holds symbols. More... | |
#define | RTEMS_RTL_OBJ_SECT_STR (1 << 8) |
Section holds strings. More... | |
#define | RTEMS_RTL_OBJ_SECT_ALLOC (1 << 9) |
Section allocates runtime memory. More... | |
#define | RTEMS_RTL_OBJ_SECT_LOAD (1 << 10) |
Section is loaded from object file. More... | |
#define | RTEMS_RTL_OBJ_SECT_WRITE (1 << 11) |
Section is writable, ie data. More... | |
#define | RTEMS_RTL_OBJ_SECT_EXEC (1 << 12) |
Section is executable. More... | |
#define | RTEMS_RTL_OBJ_SECT_ZERO (1 << 13) |
Section is preset to zero. More... | |
#define | RTEMS_RTL_OBJ_SECT_LINK (1 << 14) |
Section is link-ordered. More... | |
#define | RTEMS_RTL_OBJ_SECT_CTOR (1 << 15) |
Section contains constructors. More... | |
#define | RTEMS_RTL_OBJ_SECT_DTOR (1 << 16) |
Section contains destructors. More... | |
#define | RTEMS_RTL_OBJ_SECT_LOCD (1 << 17) |
Section has been located. More... | |
#define | RTEMS_RTL_OBJ_SECT_TYPES |
Section types mask. More... | |
#define | RTEMS_RTL_OBJ_LOCKED (1 << 0) |
Object file descriptor flags. More... | |
#define | RTEMS_RTL_OBJ_UNRESOLVED (1 << 1) |
The object file has unresolved external symbols. More... | |
Typedefs | |
typedef struct rtems_rtl_loader_format_s | rtems_rtl_loader_format_t |
Loader format definition. | |
typedef bool(* | rtems_rtl_loader_check) (rtems_rtl_obj_t *obj, int fd) |
The type of the format loader check handler. More... | |
typedef bool(* | rtems_rtl_loader_load) (rtems_rtl_obj_t *obj, int fd) |
The type of the format loader load handler. More... | |
typedef bool(* | rtems_rtl_loader_unload) (rtems_rtl_obj_t *obj) |
The type of the format loader unload handler. More... | |
typedef rtems_rtl_loader_format_t *(* | rtems_rtl_loader_sig) (void) |
The type of the format loader signature handler. More... | |
typedef struct rtems_rtl_loader_table_s | rtems_rtl_loader_table_t |
Table for supported loadable formats. | |
typedef bool(* | rtems_rtl_obj_sect_handler_t) (rtems_rtl_obj_t *obj, int fd, rtems_rtl_obj_sect_t *sect, void *data) |
A section handler is called once for each section that needs to be processed by this handler. More... | |
Functions | |
rtems_rtl_obj_t * | rtems_rtl_obj_alloc (void) |
Allocate an object structure on the heap. More... | |
bool | rtems_rtl_obj_free (rtems_rtl_obj_t *obj) |
Free the object structure and related resources. More... | |
bool | rtems_rtl_obj_unresolved (rtems_rtl_obj_t *obj) |
Does the object file have unresolved external references ? If it does the results of executing code is unpredictable. More... | |
bool | rtems_rtl_parse_name (const char *name, const char **aname, const char **oname, off_t *ooffset) |
Parses a filename and returns newly allocated strings with the archive name, object name, and the object's offset. More... | |
bool | rtems_rtl_match_name (rtems_rtl_obj_t *obj, const char *name) |
Check of the name matches the object file's object name. More... | |
bool | rtems_rtl_obj_find_file (rtems_rtl_obj_t *obj, const char *name) |
Find an object file on disk that matches the name. More... | |
bool | rtems_rtl_obj_add_section (rtems_rtl_obj_t *obj, int section, const char *name, size_t size, off_t offset, uint32_t alignment, int link, int info, uint32_t flags) |
Add a section to the object descriptor. More... | |
void | rtems_rtl_obj_erase_sections (rtems_rtl_obj_t *obj) |
Erase the object file descriptor's sections. More... | |
rtems_rtl_obj_sect_t * | rtems_rtl_obj_find_section (const rtems_rtl_obj_t *obj, const char *name) |
Find the section given a name. More... | |
rtems_rtl_obj_sect_t * | rtems_rtl_obj_find_section_by_index (const rtems_rtl_obj_t *obj, int index) |
Find a section given a section's index number. More... | |
size_t | rtems_rtl_obj_text_size (const rtems_rtl_obj_t *obj) |
The text section size. More... | |
uint32_t | rtems_rtl_obj_text_alignment (const rtems_rtl_obj_t *obj) |
The text section alignment for the object file. More... | |
size_t | rtems_rtl_obj_const_size (const rtems_rtl_obj_t *obj) |
The const section size. More... | |
uint32_t | rtems_rtl_obj_const_alignment (const rtems_rtl_obj_t *obj) |
The const section alignment for the object file. More... | |
size_t | rtems_rtl_obj_eh_size (const rtems_rtl_obj_t *obj) |
The eh section size. More... | |
uint32_t | rtems_rtl_obj_eh_alignment (const rtems_rtl_obj_t *obj) |
The eh section alignment for the object file. More... | |
size_t | rtems_rtl_obj_data_size (const rtems_rtl_obj_t *obj) |
The data section size. More... | |
uint32_t | rtems_rtl_obj_data_alignment (const rtems_rtl_obj_t *obj) |
The data section alignment for the object file. More... | |
size_t | rtems_rtl_obj_bss_size (const rtems_rtl_obj_t *obj) |
The bss section size. More... | |
uint32_t | rtems_rtl_obj_bss_alignment (const rtems_rtl_obj_t *obj) |
The bss section alignment for the object file. More... | |
bool | rtems_rtl_obj_relocate (rtems_rtl_obj_t *obj, int fd, rtems_rtl_obj_sect_handler_t handler, void *data) |
Relocate the object file. More... | |
void | rtems_rtl_obj_synchronize_cache (rtems_rtl_obj_t *obj) |
Synchronize caches to make code visible to CPU(s) More... | |
bool | rtems_rtl_obj_relocate_unresolved (rtems_rtl_unresolv_reloc_t *reloc, rtems_rtl_obj_sym_t *sym) |
Relocate an object file's unresolved reference. More... | |
bool | rtems_rtl_obj_load_symbols (rtems_rtl_obj_t *obj, int fd, rtems_rtl_obj_sect_handler_t handler, void *data) |
Load the symbols from the object file. More... | |
bool | rtems_rtl_obj_load_sections (rtems_rtl_obj_t *obj, int fd, rtems_rtl_obj_sect_handler_t handler, void *data) |
Load the sections that have been allocated memory in the target. More... | |
void | rtems_rtl_obj_run_ctors (rtems_rtl_obj_t *obj) |
Invoke the constructors the object has. More... | |
void | rtems_rtl_obj_run_dtors (rtems_rtl_obj_t *obj) |
Invoke the destructors the object has. More... | |
bool | rtems_rtl_obj_load (rtems_rtl_obj_t *obj) |
Load the object file, reading all sections into memory, symbols and performing any relocation fixups. More... | |
bool | rtems_rtl_obj_unload (rtems_rtl_obj_t *obj) |
Unload the object file, erasing all symbols and releasing all memory. More... | |
RTEMS Run-Time Linker Object Support.
#define RTEMS_RTL_OBJ_LOCKED (1 << 0) |
Object file descriptor flags.
Lock the object file so it cannot be unloaded.
Referenced by rtems_rtl_obj_free().
#define RTEMS_RTL_OBJ_SECT_ALLOC (1 << 9) |
Section allocates runtime memory.
#define RTEMS_RTL_OBJ_SECT_BSS (1 << 3) |
Section holds program bss.
Referenced by rtems_rtl_obj_synchronize_cache().
#define RTEMS_RTL_OBJ_SECT_CONST (1 << 1) |
Section holds program text.
Referenced by rtems_rtl_elf_unwind_dw2_parse(), and rtems_rtl_obj_synchronize_cache().
#define RTEMS_RTL_OBJ_SECT_CTOR (1 << 15) |
Section contains constructors.
#define RTEMS_RTL_OBJ_SECT_DATA (1 << 2) |
Section holds program data.
Referenced by rtems_rtl_obj_synchronize_cache().
#define RTEMS_RTL_OBJ_SECT_DTOR (1 << 16) |
Section contains destructors.
#define RTEMS_RTL_OBJ_SECT_EH (1 << 4) |
Section holds exception data.
Referenced by rtems_rtl_obj_synchronize_cache().
#define RTEMS_RTL_OBJ_SECT_EXEC (1 << 12) |
Section is executable.
Referenced by rtems_rtl_obj_synchronize_cache().
#define RTEMS_RTL_OBJ_SECT_LINK (1 << 14) |
Section is link-ordered.
#define RTEMS_RTL_OBJ_SECT_LOAD (1 << 10) |
Section is loaded from object file.
#define RTEMS_RTL_OBJ_SECT_LOCD (1 << 17) |
Section has been located.
#define RTEMS_RTL_OBJ_SECT_REL (1 << 5) |
Section holds relocation records.
#define RTEMS_RTL_OBJ_SECT_RELA (1 << 6) |
Section holds relocation addend records.
#define RTEMS_RTL_OBJ_SECT_STR (1 << 8) |
Section holds strings.
#define RTEMS_RTL_OBJ_SECT_SYM (1 << 7) |
Section holds symbols.
#define RTEMS_RTL_OBJ_SECT_TEXT (1 << 0) |
Flags for the various section types.
Section holds program text.
Referenced by rtems_rtl_obj_synchronize_cache().
#define RTEMS_RTL_OBJ_SECT_TYPES |
Section types mask.
#define RTEMS_RTL_OBJ_SECT_WRITE (1 << 11) |
Section is writable, ie data.
#define RTEMS_RTL_OBJ_SECT_ZERO (1 << 13) |
Section is preset to zero.
#define RTEMS_RTL_OBJ_UNRESOLVED (1 << 1) |
The object file has unresolved external symbols.
Referenced by rtems_rtl_obj_unresolved().
typedef bool(* rtems_rtl_loader_check) (rtems_rtl_obj_t *obj, int fd) |
The type of the format loader check handler.
This handler checks the format and if it is detected as suitable it returns true.
typedef bool(* rtems_rtl_loader_load) (rtems_rtl_obj_t *obj, int fd) |
The type of the format loader load handler.
This handler loads the specific format.
typedef rtems_rtl_loader_format_t*(* rtems_rtl_loader_sig) (void) |
The type of the format loader signature handler.
This handler checks the format signature.
typedef bool(* rtems_rtl_loader_unload) (rtems_rtl_obj_t *obj) |
The type of the format loader unload handler.
This handler unloads the specific format.
typedef bool(* rtems_rtl_obj_sect_handler_t) (rtems_rtl_obj_t *obj, int fd, rtems_rtl_obj_sect_t *sect, void *data) |
A section handler is called once for each section that needs to be processed by this handler.
obj | The object file's descriptor the section belongs too. |
fd | The file descriptor of the object file beling loaded. |
sect | The section the handler is being invoked to handle. |
data | A user supplied data variable. |
true | The operation was successful. |
false | The operation failed and the RTL has been set. |
bool rtems_rtl_match_name | ( | rtems_rtl_obj_t * | obj, |
const char * | name | ||
) |
Check of the name matches the object file's object name.
obj | The object file's descriptor. |
name | The name to match. |
References rtems_rtl_obj_s::oname.
bool rtems_rtl_obj_add_section | ( | rtems_rtl_obj_t * | obj, |
int | section, | ||
const char * | name, | ||
size_t | size, | ||
off_t | offset, | ||
uint32_t | alignment, | ||
int | link, | ||
int | info, | ||
uint32_t | flags | ||
) |
Add a section to the object descriptor.
obj | The object file's descriptor. |
section | The section's index number. |
name | The name of the section. |
size | The size of the section in memory. |
offset | The offset of the section in the object file. |
alignment | The alignment of the section in memory. |
link | The section's link field (from the ELF format). |
info | The section's info field (from the ELF format). |
flags | The section's flags. |
true | The section has been added. |
false | The section has not been added. See the RTL error. |
rtems_rtl_obj_t* rtems_rtl_obj_alloc | ( | void | ) |
Allocate an object structure on the heap.
NULL | No memory for the object. |
References rtems_rtl_obj_s::format, rtems_chain_initialize_empty(), rtems_rtl_alloc_new(), RTEMS_RTL_ALLOC_OBJECT, and rtems_rtl_obj_s::sections.
uint32_t rtems_rtl_obj_bss_alignment | ( | const rtems_rtl_obj_t * | obj | ) |
The bss section alignment for the object file.
Only use once all the sections has been added. The section alignment is the alignment of the first bss type section loaded the bss section.
You can assume the alignment is a positive integral power of 2 if not 0 or
obj | The object file's descriptor. |
Referenced by rtems_rtl_obj_load_sections().
size_t rtems_rtl_obj_bss_size | ( | const rtems_rtl_obj_t * | obj | ) |
The bss section size.
Only use once all the sections has been added. It includes alignments between sections that are part of the object's bss area.
obj | The object file's descriptor. |
Referenced by rtems_rtl_obj_load_sections().
uint32_t rtems_rtl_obj_const_alignment | ( | const rtems_rtl_obj_t * | obj | ) |
The const section alignment for the object file.
Only use once all the sections has been added. The section alignment is the alignment of the first const type section loaded the const section.
You can assume the alignment is a positive integral power of 2 if not 0 or
obj | The object file's descriptor. |
Referenced by rtems_rtl_obj_load_sections().
size_t rtems_rtl_obj_const_size | ( | const rtems_rtl_obj_t * | obj | ) |
The const section size.
Only use once all the sections has been added. It includes alignments between sections that are part of the object's const area. The consts sections are included in this section.
obj | The object file's descriptor. |
Referenced by rtems_rtl_obj_load_sections().
uint32_t rtems_rtl_obj_data_alignment | ( | const rtems_rtl_obj_t * | obj | ) |
The data section alignment for the object file.
Only use once all the sections has been added. The section alignment is the alignment of the first data type section loaded the data section.
You can assume the alignment is a positive integral power of 2 if not 0 or
obj | The object file's descriptor. |
Referenced by rtems_rtl_obj_load_sections().
size_t rtems_rtl_obj_data_size | ( | const rtems_rtl_obj_t * | obj | ) |
The data section size.
Only use once all the sections has been added. It includes alignments between sections that are part of the object's data area.
obj | The object file's descriptor. |
Referenced by rtems_rtl_obj_load_sections().
uint32_t rtems_rtl_obj_eh_alignment | ( | const rtems_rtl_obj_t * | obj | ) |
The eh section alignment for the object file.
Only use once all the sections has been added. The section alignment is the alignment of the first bss type section loaded the bss section.
You can assume the alignment is a positive integral power of 2 if not 0 or
obj | The object file's descriptor. |
Referenced by rtems_rtl_obj_load_sections().
size_t rtems_rtl_obj_eh_size | ( | const rtems_rtl_obj_t * | obj | ) |
The eh section size.
Only use once all the sections has been added. It includes alignments between sections that are part of the object's bss area.
obj | The object file's descriptor. |
Referenced by rtems_rtl_obj_load_sections().
void rtems_rtl_obj_erase_sections | ( | rtems_rtl_obj_t * | obj | ) |
Erase the object file descriptor's sections.
obj | The object file's descriptor. |
References rtems_rtl_obj_sect_s::name, rtems_chain_extract(), rtems_chain_first(), rtems_chain_is_tail(), rtems_chain_next(), rtems_rtl_alloc_del(), RTEMS_RTL_ALLOC_OBJECT, and rtems_rtl_obj_s::sections.
bool rtems_rtl_obj_find_file | ( | rtems_rtl_obj_t * | obj, |
const char * | name | ||
) |
Find an object file on disk that matches the name.
The object descriptor is fill in with the various parts of a name. A name can have archive, object file and offset components. The search path in the RTL is searched.
obj | The object file's descriptor. |
name | The name to locate on disk. |
true | The file has been found. |
false | The file could not be located. The RTL error has been set. |
rtems_rtl_obj_sect_t* rtems_rtl_obj_find_section | ( | const rtems_rtl_obj_t * | obj, |
const char * | name | ||
) |
Find the section given a name.
obj | The object file's descriptor. |
name | The name of the section to find. |
NULL | The section was not found. |
References rtems_rtl_obj_sect_finder_t::name, and rtems_rtl_obj_sect_finder_t::sect.
Referenced by rtems_rtl_elf_unwind_dw2_deregister(), and rtems_rtl_elf_unwind_dw2_register().
rtems_rtl_obj_sect_t* rtems_rtl_obj_find_section_by_index | ( | const rtems_rtl_obj_t * | obj, |
int | index | ||
) |
Find a section given a section's index number.
obj | The object file's descriptor. |
index | The section's index to find. |
NULL | The section was not found. |
Referenced by rtems_rtl_obj_relocate_unresolved().
bool rtems_rtl_obj_free | ( | rtems_rtl_obj_t * | obj | ) |
Free the object structure and related resources.
obj | The object file's descriptor to free. |
false | The object has dependences. |
true | The object has been freed. |
References rtems_rtl_obj_s::bss_base, rtems_rtl_obj_s::const_base, rtems_rtl_obj_s::data_base, rtems_rtl_obj_s::eh_base, rtems_rtl_obj_s::flags, rtems_rtl_obj_s::link, rtems_chain_extract(), rtems_chain_is_node_off_chain(), rtems_rtl_alloc_module_del(), RTEMS_RTL_OBJ_LOCKED, rtems_rtl_set_error(), rtems_rtl_symbol_obj_erase(), rtems_rtl_obj_s::text_base, and rtems_rtl_obj_s::users.
bool rtems_rtl_obj_load | ( | rtems_rtl_obj_t * | obj | ) |
Load the object file, reading all sections into memory, symbols and performing any relocation fixups.
obj | The object file's descriptor. |
true | The object file has been loaded. |
false | The load failed. The RTL error has been set. |
bool rtems_rtl_obj_load_sections | ( | rtems_rtl_obj_t * | obj, |
int | fd, | ||
rtems_rtl_obj_sect_handler_t | handler, | ||
void * | data | ||
) |
Load the sections that have been allocated memory in the target.
The bss type section does not load any data, it is set to 0. The text and data sections read the detault data from the object file into the target memory.
obj | The object file's descriptor. |
fd | The object file's file descriptor. |
handler | The object file's format specific load handler. |
data | User specific data handle. |
true | The object has been sucessfully loaded. |
false | The load failed. The RTL error has been set. |
References rtems_rtl_obj_s::bss_base, rtems_rtl_obj_s::bss_size, rtems_rtl_obj_s::const_base, rtems_rtl_obj_s::data_base, rtems_rtl_obj_s::eh_base, rtems_rtl_obj_s::eh_size, rtems_rtl_obj_s::exec_size, rtems_rtl_alloc_module_new(), rtems_rtl_obj_bss_alignment(), rtems_rtl_obj_bss_size(), rtems_rtl_obj_const_alignment(), rtems_rtl_obj_const_size(), rtems_rtl_obj_data_alignment(), rtems_rtl_obj_data_size(), rtems_rtl_obj_eh_alignment(), rtems_rtl_obj_eh_size(), rtems_rtl_obj_text_size(), rtems_rtl_set_error(), rtems_rtl_trace(), rtems_rtl_obj_s::text_base, and rtems_rtl_obj_s::text_size.
bool rtems_rtl_obj_load_symbols | ( | rtems_rtl_obj_t * | obj, |
int | fd, | ||
rtems_rtl_obj_sect_handler_t | handler, | ||
void * | data | ||
) |
Load the symbols from the object file.
Only the exported or public symbols are read into memory and held in the global symbol table.
obj | The object file's descriptor. |
fd | The object file's file descriptor. |
handler | The object file's format specific symbol handler. |
data | User specific data handle. |
true | The object file's symbol where loaded. |
false | The symbol loading failed. The RTL error is set. |
bool rtems_rtl_obj_relocate | ( | rtems_rtl_obj_t * | obj, |
int | fd, | ||
rtems_rtl_obj_sect_handler_t | handler, | ||
void * | data | ||
) |
Relocate the object file.
The object file's section are parsed for any relocation type sections.
obj | The object file's descriptor. |
fd | The object file's file descriptor. |
handler | The object file's format specific relocation handler. |
data | User specific data handle. |
true | The object file was relocated. |
false | The relocation failed. The RTL error is set. |
bool rtems_rtl_obj_relocate_unresolved | ( | rtems_rtl_unresolv_reloc_t * | reloc, |
rtems_rtl_obj_sym_t * | sym | ||
) |
Relocate an object file's unresolved reference.
rec | The unresolved relocation record. |
sym | The unresolved relocation's referenced symbol. |
true | The object file record was relocated. |
false | The relocation failed. The RTL error is set. |
References rtems_rtl_unresolv_reloc_s::flags, rtems_rtl_unresolv_reloc_s::obj, rtems_rtl_unresolv_reloc_s::rel, REL_R_OFFSET, rtems_rtl_obj_find_section_by_index(), rtems_rtl_set_error(), rtems_rtl_unresolv_reloc_s::sect, and rtems_rtl_obj_sym_s::value.
void rtems_rtl_obj_run_ctors | ( | rtems_rtl_obj_t * | obj | ) |
Invoke the constructors the object has.
Constructors are a table of pointers to "void (*)(void);" where NULL pointers are skipped. The table's size is taken from the section's size. The objet ELF specific code is responisble for flagging which sections contain constructors.
obj | The object file's descriptor. |
Referenced by rtems_rtl_run_ctors().
void rtems_rtl_obj_run_dtors | ( | rtems_rtl_obj_t * | obj | ) |
Invoke the destructors the object has.
Destructors are a table of pointers to "void (*)(void);" where NULL pointers are skipped. The table's size is taken from the section's size. The objet ELF specific code is responisble for flagging which sections contain destructors.
obj | The object file's descriptor. |
void rtems_rtl_obj_synchronize_cache | ( | rtems_rtl_obj_t * | obj | ) |
Synchronize caches to make code visible to CPU(s)
obj | The object file's descriptor. |
References rtems_cache_get_instruction_line_size(), rtems_cache_get_maximal_line_size(), rtems_rtl_chain_iterate(), RTEMS_RTL_OBJ_SECT_BSS, RTEMS_RTL_OBJ_SECT_CONST, RTEMS_RTL_OBJ_SECT_DATA, RTEMS_RTL_OBJ_SECT_EH, RTEMS_RTL_OBJ_SECT_EXEC, RTEMS_RTL_OBJ_SECT_TEXT, and rtems_rtl_obj_s::sections.
uint32_t rtems_rtl_obj_text_alignment | ( | const rtems_rtl_obj_t * | obj | ) |
The text section alignment for the object file.
Only use once all the sections has been added. The section alignment is the alignment of the first text type section loaded the text section.
You can assume the alignment is a positive integral power of 2 if not 0 or
obj | The object file's descriptor. |
size_t rtems_rtl_obj_text_size | ( | const rtems_rtl_obj_t * | obj | ) |
The text section size.
Only use once all the sections has been added. It includes alignments between sections that are part of the object's text area. The consts sections are included in this section.
obj | The object file's descriptor. |
Referenced by rtems_rtl_obj_load_sections().
bool rtems_rtl_obj_unload | ( | rtems_rtl_obj_t * | obj | ) |
Unload the object file, erasing all symbols and releasing all memory.
obj | The object file's descriptor. |
true | The object file has been unloaded. |
false | The unload failed. The RTL error has been set. |
bool rtems_rtl_obj_unresolved | ( | rtems_rtl_obj_t * | obj | ) |
Does the object file have unresolved external references ? If it does the results of executing code is unpredictable.
obj | The object file's descriptor. |
true | The object file has unresolved externals. |
false | The object file has all external references resolved. |
References rtems_rtl_obj_s::flags, and RTEMS_RTL_OBJ_UNRESOLVED.
bool rtems_rtl_parse_name | ( | const char * | name, |
const char ** | aname, | ||
const char ** | oname, | ||
off_t * | ooffset | ||
) |
Parses a filename and returns newly allocated strings with the archive name, object name, and the object's offset.
name | The filename of the object |
aname | Address of a string pointer that holds the archive name |
oname | Address of a string pointer that holds the object name |
ooffset | Address of an int that holds the object offset |
true | The parsing was successful |
false | The parsing was unsuccessful |
Referenced by rtems_rtl_find_obj().