elf-loader.h File Reference

Go to the source code of this file.

Defines

#define ELF_BADFORMAT   2001
#define ELF_BADARCH   2002
#define ELF_CORRUPT   2003
#define ELF_NOSTANDARD   2004
#define ELF_LINK   2005
#define ELF_INTERPRETER   2006

Functions

int elf_map_binary (app_t *app)
 Load program sections of binary which must be interpreted by libld-l4.s.so.
int elf_map_ldso (app_t *app, l4_addr_t app_addr)
 Load the libld-l4.s.so interpreter.
int elf_check_ftype (const l4_addr_t img, const l4_size_t size, const l4env_infopage_t *env)

Variables

const char *const interp


Detailed Description

Date:
Author:
Frank Mehnert <fm3@os.inf.tu-dresden.de>

Function Documentation

int elf_check_ftype ( const l4_addr_t  img,
const l4_size_t  size,
const l4env_infopage_t env 
)

Parameters:
img Pointer to binary image in memory
size Size of image
env L4Env info page
Returns:
0 Image is ELF for given architecture -ELF_INTERPRETER Found an interpreter section.
-L4_EINVAL Invalid input data, or invalid interpreter detected -ELF_BADFORMAT Image is not ELF for given arch -ELF_CORRUPT Image is corrupt

int elf_map_binary ( app_t app  ) 

Load program sections of binary which must be interpreted by libld-l4.s.so.

Parameters:
app application
Returns:
0 if success

int elf_map_ldso ( app_t app,
l4_addr_t  app_addr 
)

Load the libld-l4.s.so interpreter.

Parameters:
app application
app_addr load address inside application
Returns:
0 on success


L4 Loader Reference Manual, part of DROPS  © 2000-2003