My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Macros | Functions
elf_loader.h File Reference
#include <task.h>

Go to the source code of this file.

Classes

struct  kernel_symbol
 

Macros

#define ELF_FLAG   (0x7245)
 
#define ELF_FLAG_MAP   (0x5859)
 
#define __EXPORT_SYMBOL(sym, sec)
 
#define EXPORT_SYMBOL(sym)   __EXPORT_SYMBOL(sym, "")
 

Functions

int elf_load (sa_config_t *conf)
 the main elf loader function More...
 
int elf_loader_cleanup (void)
 cleans up the reserved secure memory region More...
 

Macro Definition Documentation

#define __EXPORT_SYMBOL (   sym,
  sec 
)
Value:
extern __typeof__(sym) sym; \
static const char __kstrtab_##sym[] \
__attribute__((section("__ksymtab_strings"), aligned(1))) \
= #sym; \
static const struct kernel_symbol __ksymtab_##sym \
__attribute__((section("__ksymtab" sec), unused)) \
= { (unsigned long)&sym, __kstrtab_##sym }
#define ELF_FLAG   (0x7245)
#define ELF_FLAG_MAP   (0x5859)
#define EXPORT_SYMBOL (   sym)    __EXPORT_SYMBOL(sym, "")

Function Documentation

int elf_load ( sa_config_t conf)

the main elf loader function

The main loader function which will be called by the __elf_load() syscall, has functionality for handling both relocatable files and executable files, although executable file support is not required as of now, so control doesn't go to the executable file part of the function.

Parameters
conf: configuration parameter for the task
Returns
0 on success, -1 on failure
int elf_loader_cleanup ( void  )

cleans up the reserved secure memory region

Returns
0 on cleanup success, -1 on failure