RTEMS CPU Kit with SuperCore  4.11.3
rtl-elf.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT (c) 2012 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  */
16 #if !defined (_RTEMS_RTL_ELF_H_)
17 #define _RTEMS_RTL_ELF_H_
18 
19 #include "rtl-fwd.h"
20 #include "rtl-obj-fwd.h"
21 #include "rtl-sym.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif /* __cplusplus */
26 
31 /*
32  * Always 32bit for RTEMS at the moment. Do not add '()'. Leave plain.
33  */
34 #define ELFSIZE 32
35 
36 /*
37  * Define _STANDALONE then remove after.
38  */
39 #define _STANDALONE 1
40 
41 #include <sys/cdefs.h>
42 #include <sys/exec_elf.h>
43 
44 #undef _STANDALONE
45 
55 #define RTEMS_RTL_ELF_STRING_MAX (256)
56 
66 uint32_t rtems_rtl_elf_section_flags (const rtems_rtl_obj_t* obj,
67  const Elf_Shdr* shdr);
68 
77 bool rtems_rtl_elf_rel_resolve_sym (Elf_Word type);
78 
94  const Elf_Rel* rel,
95  const rtems_rtl_obj_sect_t* sect,
96  const char* symname,
97  const Elf_Byte syminfo,
98  const Elf_Word symvalue);
99 
115  const Elf_Rela* rela,
116  const rtems_rtl_obj_sect_t* sect,
117  const char* symname,
118  const Elf_Byte syminfo,
119  const Elf_Word symvalue);
120 
139  const Elf_Sym* sym,
140  const char* symname,
141  Elf_Word* value);
142 
149 bool rtems_rtl_elf_file_check (rtems_rtl_obj_t* obj, int fd);
150 
157 bool rtems_rtl_elf_file_load (rtems_rtl_obj_t* obj, int fd);
158 
165 
172 
173 #ifdef __cplusplus
174 }
175 #endif /* __cplusplus */
176 
177 #endif
bool rtems_rtl_elf_file_unload(rtems_rtl_obj_t *obj)
The ELF format unload handler.
Definition: rtl-elf.c:995
uint32_t rtems_rtl_elf_section_flags(const rtems_rtl_obj_t *obj, const Elf_Shdr *shdr)
Architecture specific handler to translate unknown section flags to RTL section flags.
Definition: rtl-mdreloc-arm.c:70
RTEMS Run-Time Linker ELF Headers.
An object file is made up of sections and the can be more than one of a specific type of sections...
Definition: rtl-obj.h:125
RTEMS Run-Time Linker Object File Symbol Table.
bool rtems_rtl_elf_file_check(rtems_rtl_obj_t *obj, int fd)
The ELF format check handler.
Definition: rtl-elf.c:773
bool rtems_rtl_elf_rel_resolve_sym(Elf_Word type)
Architecture specific handler to check is a relocation record&#39;s type is required to resolve a symbol...
Definition: rtl-mdreloc-arm.c:80
bool rtems_rtl_elf_file_load(rtems_rtl_obj_t *obj, int fd)
The ELF format load handler.
Definition: rtl-elf.c:905
rtems_rtl_loader_format_t * rtems_rtl_elf_file_sig(void)
The ELF format signature handler.
Definition: rtl-elf.c:1002
RTL Object.
Definition: rtl-obj.h:156
bool rtems_rtl_elf_relocate_rela(const rtems_rtl_obj_t *obj, const Elf_Rela *rela, const rtems_rtl_obj_sect_t *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...
Definition: rtl-mdreloc-arm.c:86
RTEMS Run-Time Linker ELF Headers.
bool rtems_rtl_elf_find_symbol(rtems_rtl_obj_t *obj, const Elf_Sym *sym, const char *symname, Elf_Word *value)
Find the symbol.
Definition: rtl-elf.c:68
Loader format definition.
Definition: rtl-obj.h:38
bool rtems_rtl_elf_relocate_rel(const rtems_rtl_obj_t *obj, const Elf_Rel *rel, const rtems_rtl_obj_sect_t *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...
Definition: rtl-mdreloc-arm.c:98