RTEMS
5.1
|
RTEMS Run-Time Linker ELF Headers. More...
#include <rtems/rtl/rtl-fwd.h>
#include <rtems/rtl/rtl-obj-fwd.h>
#include <rtems/rtl/rtl-sym.h>
#include <sys/cdefs.h>
#include <sys/exec_elf.h>
Go to the source code of this file.
Data Structures | |
struct | rtems_rtl_mdreloc_trmap |
Macros | |
#define | ELFSIZE 32 |
#define | _STANDALONE 1 |
#define | RTEMS_RTL_ELF_STRING_MAX (256) |
Typedefs | |
typedef enum rtems_rtl_elf_rel_status | rtems_rtl_elf_rel_status |
typedef struct rtems_rtl_mdreloc_trmap | rtems_rtl_mdreloc_tramp |
Enumerations | |
enum | rtems_rtl_elf_rel_status { rtems_rtl_elf_rel_no_error, rtems_rtl_elf_rel_failure, rtems_rtl_elf_rel_tramp_cache, rtems_rtl_elf_rel_tramp_add } |
Functions | |
uint32_t | rtems_rtl_elf_section_flags (const rtems_rtl_obj *obj, const Elf_Shdr *shdr) |
uint32_t | rtems_rtl_elf_arch_parse_section (const rtems_rtl_obj *obj, int section, const char *name, const Elf_Shdr *shdr, const uint32_t flags) |
bool | rtems_rtl_elf_arch_section_alloc (const rtems_rtl_obj *obj, rtems_rtl_obj_sect *sect) |
bool | rtems_rtl_elf_arch_section_free (const rtems_rtl_obj *obj, rtems_rtl_obj_sect *sect) |
bool | rtems_rtl_elf_rel_resolve_sym (Elf_Word type) |
size_t | rtems_rtl_elf_relocate_tramp_max_size (void) |
rtems_rtl_elf_rel_status | rtems_rtl_elf_relocate_rel_tramp (rtems_rtl_obj *obj, const Elf_Rel *rel, const rtems_rtl_obj_sect *sect, const char *symname, const Elf_Byte syminfo, const Elf_Word symvalue) |
rtems_rtl_elf_rel_status | rtems_rtl_elf_relocate_rela_tramp (rtems_rtl_obj *obj, const Elf_Rela *rela, const rtems_rtl_obj_sect *sect, const char *symname, const Elf_Byte syminfo, const Elf_Word symvalue) |
rtems_rtl_elf_rel_status | rtems_rtl_elf_relocate_rel (rtems_rtl_obj *obj, const Elf_Rel *rel, const rtems_rtl_obj_sect *sect, const char *symname, const Elf_Byte syminfo, const Elf_Word symvalue) |
rtems_rtl_elf_rel_status | rtems_rtl_elf_relocate_rela (rtems_rtl_obj *obj, const Elf_Rela *rela, const rtems_rtl_obj_sect *sect, const char *symname, const Elf_Byte syminfo, const Elf_Word symvalue) |
bool | rtems_rtl_elf_file_check (rtems_rtl_obj *obj, int fd) |
bool | rtems_rtl_elf_file_load (rtems_rtl_obj *obj, int fd) |
bool | rtems_rtl_elf_file_unload (rtems_rtl_obj *obj) |
rtems_rtl_loader_format * | rtems_rtl_elf_file_sig (void) |
RTEMS Run-Time Linker ELF Headers.
#define ELFSIZE 32 |
Imported NetBSD ELF Specifics Start.
#define RTEMS_RTL_ELF_STRING_MAX (256) |
Maximum string length. This a read buffering limit rather than a specific ELF length. I hope this is ok as I am concerned about some C++ symbol lengths.
typedef enum rtems_rtl_elf_rel_status rtems_rtl_elf_rel_status |
Imported NetBSD ELF Specifics End.ELF Relocation status codes.
typedef struct rtems_rtl_mdreloc_trmap rtems_rtl_mdreloc_tramp |
Relocation trampoline relocation data.
Imported NetBSD ELF Specifics End.ELF Relocation status codes.
uint32_t rtems_rtl_elf_arch_parse_section | ( | const rtems_rtl_obj * | obj, |
int | section, | ||
const char * | name, | ||
const Elf_Shdr * | shdr, | ||
const uint32_t | flags | ||
) |
Architecture specific handler to parse the section and add any flags that may be need to handle the section.
obj | The object file being relocated. |
seciton | The section index. |
name | The name of the section |
shdr | The ELF section header. |
flags | The standard ELF parsed flags. |
uint32_t | Extra RTL object file flags. |
bool rtems_rtl_elf_arch_section_alloc | ( | const rtems_rtl_obj * | obj, |
rtems_rtl_obj_sect * | sect | ||
) |
Architecture specific handler to allocate a section. Some sections are specific to an architecture and need special allocators.
obj | The object file being relocated. |
sect | The section data. |
true | The allocator was successful. |
bool rtems_rtl_elf_arch_section_free | ( | const rtems_rtl_obj * | obj, |
rtems_rtl_obj_sect * | sect | ||
) |
Architecture specific handler to free a section. Some sections are specific to an architecture and need special allocators.
obj | The object file being relocated. |
sect | The section data. |
true | The allocator was successful. |
bool rtems_rtl_elf_file_check | ( | rtems_rtl_obj * | obj, |
int | fd | ||
) |
The ELF format check handler.
obj | The object being checked. |
fd | The file descriptor. |
bool rtems_rtl_elf_file_load | ( | rtems_rtl_obj * | obj, |
int | fd | ||
) |
The ELF format load handler.
obj | The object to load. |
fd | The file descriptor. |
rtems_rtl_loader_format* rtems_rtl_elf_file_sig | ( | void | ) |
The ELF format signature handler.
bool rtems_rtl_elf_file_unload | ( | rtems_rtl_obj * | obj | ) |
The ELF format unload handler.
obj | The object to unload. |
bool rtems_rtl_elf_rel_resolve_sym | ( | Elf_Word | type | ) |
Architecture specific handler to check is a relocation record's type is required to resolve a symbol.
type | The type field in the relocation record. |
true | The relocation record require symbol resolution. |
false | The relocation record does not require symbol resolution. |
rtems_rtl_elf_rel_status rtems_rtl_elf_relocate_rel | ( | rtems_rtl_obj * | obj, |
const Elf_Rel * | rel, | ||
const rtems_rtl_obj_sect * | sect, | ||
const char * | symname, | ||
const Elf_Byte | syminfo, | ||
const Elf_Word | symvalue | ||
) |
Architecture specific relocation handler compiled in for a specific architecture by the build system. The handler applies the relocation to the target.
obj | The object file being relocated. |
rel | The ELF relocation record. |
sect | The section of the object file the relocation is for. |
symname | The symbol's name. |
syminfo | The ELF symbol info field. |
symvalue | If a symbol is referenced, this is the symbols value. |
rtems_rtl_elf_rel_status | The result of the trampoline parsing. |
rtems_rtl_elf_rel_status rtems_rtl_elf_relocate_rel_tramp | ( | rtems_rtl_obj * | obj, |
const Elf_Rel * | rel, | ||
const rtems_rtl_obj_sect * | sect, | ||
const char * | symname, | ||
const Elf_Byte | syminfo, | ||
const Elf_Word | symvalue | ||
) |
Architecture specific relocation trampoline handler compiled in for a specific architecture by the build system. The handler determines if the relocation record requires a trampoline.
obj | The object file being relocated. |
rela | The ELF relocation record. |
sect | The section of the object file the relocation is for. |
symname | The symbol's name. |
syminfo | The ELF symbol info field. |
symvalue | If a symbol is referenced, this is the symbols value. |
rtems_rtl_elf_rel_status | The result of the trampoline parsing. |
rtems_rtl_elf_rel_status rtems_rtl_elf_relocate_rela | ( | rtems_rtl_obj * | obj, |
const Elf_Rela * | rela, | ||
const rtems_rtl_obj_sect * | sect, | ||
const char * | symname, | ||
const Elf_Byte | syminfo, | ||
const Elf_Word | symvalue | ||
) |
Architecture specific relocation handler compiled in for a specific architecture by the build system. The handler applies the relocation to the target.
obj | The object file being relocated. |
rela | The ELF addend relocation record. |
sect | The section of the object file the relocation is for. |
symname | The symbol's name. |
syminfo | The ELF symbol info field. |
symvalue | If a symbol is referenced, this is the symbols value. |
rtems_rtl_elf_rel_status | The result of the trampoline parsing. |
rtems_rtl_elf_rel_status rtems_rtl_elf_relocate_rela_tramp | ( | rtems_rtl_obj * | obj, |
const Elf_Rela * | rela, | ||
const rtems_rtl_obj_sect * | sect, | ||
const char * | symname, | ||
const Elf_Byte | syminfo, | ||
const Elf_Word | symvalue | ||
) |
Architecture specific relocation handler compiled in for a specific architecture by the build system. The handler applies the relocation to the target.
obj | The object file being relocated. |
rela | The ELF addend relocation record. |
sect | The section of the object file the relocation is for. |
symname | The symbol's name. |
syminfo | The ELF symbol info field. |
symvalue | If a symbol is referenced, this is the symbols value. |
rtems_rtl_elf_rel_status | The result of the trampoline parsing. |
size_t rtems_rtl_elf_relocate_tramp_max_size | ( | void | ) |
Architecture specific relocation maximum trampoline size. A trampoline entry of this size is allocated for each unresolved external.
uint32_t rtems_rtl_elf_section_flags | ( | const rtems_rtl_obj * | obj, |
const Elf_Shdr * | shdr | ||
) |
Architecture specific handler to translate unknown section flags to RTL section flags. If this function returns 0 an error is raised.
obj | The object file being relocated. |
shdr | The ELF section header. |
0 | Unknown or unsupported flags. |
uint32_t | RTL object file flags. |