Loading...
Searching...
No Matches
L4Re ELF Auxiliary Information
L4Re C++ Interface

API for embedding auxiliary information into binary programs. More...

Collaboration diagram for L4Re ELF Auxiliary Information:

## Data Structures

struct | l4re_elf_aux_t
| Generic header for each auxiliary vector element. More...
struct | l4re_elf_aux_vma_t
| Auxiliary vector element for a reserved virtual memory area. More...
struct | l4re_elf_aux_mword_t
| Auxiliary vector element for a single unsigned data word. More...

## Macros

#define | L4RE_ELF_AUX_ELEM const __attribute__((used, section(".rol4re_elf_aux"), aligned(sizeof(l4_umword_t))))
| Define an auxiliary vector element.
#define | L4RE_ELF_AUX_ELEM_T(type, id, tag, val...)
| Define an auxiliary vector element.

## Typedefs

typedef struct l4re_elf_aux_t | l4re_elf_aux_t
| Generic header for each auxiliary vector element.
typedef struct l4re_elf_aux_vma_t | l4re_elf_aux_vma_t
| Auxiliary vector element for a reserved virtual memory area.
typedef struct l4re_elf_aux_mword_t | l4re_elf_aux_mword_t
| Auxiliary vector element for a single unsigned data word.

## Enumerations

enum | { L4RE_ELF_AUX_T_NONE = 0 , L4RE_ELF_AUX_T_VMA , L4RE_ELF_AUX_T_STACK_SIZE , L4RE_ELF_AUX_T_STACK_ADDR , L4RE_ELF_AUX_T_KIP_ADDR , L4RE_ELF_AUX_T_EX_REGS_FLAGS }

## Detailed Description

API for embedding auxiliary information into binary programs.

This API allows information for the binary loader to be embedded into a binary application. This information can be reserved areas in the virtual memory of an application and things such as the stack size to be allocated for the first application thread.

## Macro Definition Documentation

## L4RE_ELF_AUX_ELEM

#define L4RE_ELF_AUX_ELEM const __attribute__((used, section(".rol4re_elf_aux"), aligned(sizeof(l4_umword_t))))

Define an auxiliary vector element.

This is the generic method for defining auxiliary vector elements. A more convenient way is to use L4RE_ELF_AUX_ELEM_T.

Usage:

L4RE_ELF_AUX_ELEM l4re_elf_aux_vma_t decl_name =
{ L4RE_ELF_AUX_T_VMA, sizeof(l4re_elf_aux_vma_t), 0x2000, 0x4000 };
L4RE_ELF_AUX_ELEM
#define L4RE_ELF_AUX_ELEM
Define an auxiliary vector element.
Definition elf_aux.h:41
L4RE_ELF_AUX_T_VMA
@ L4RE_ELF_AUX_T_VMA
Tag for descriptor for a reserved virtual memory area.
Definition elf_aux.h:69
l4re_elf_aux_vma_t
Auxiliary vector element for a reserved virtual memory area.
Definition elf_aux.h:108

Definition at line 41 of file elf_aux.h.

## L4RE_ELF_AUX_ELEM_T

#define L4RE_ELF_AUX_ELEM_T | ( |  | type,
|  |  | id,
|  |  | tag,
|  |  | val... )

Value:
static L4RE_ELF_AUX_ELEM type id = {tag, sizeof(type), val}

Define an auxiliary vector element.

Parameters

  type | is the data type for the element (e.g., l4re_elf_aux_vma_t)
  id | is the identifier (variable name) for the declaration (the variable is defined with `static` storage class)
  tag | is the tag value for the element e.g., L4RE_ELF_AUX_T_VMA
  val | are the values to be set in the descriptor

Usage:

L4RE_ELF_AUX_ELEM_T(l4re_elf_aux_vma_t, decl_name, L4RE_ELF_AUX_T_VMA, 0x2000, 0x4000 };
L4RE_ELF_AUX_ELEM_T
#define L4RE_ELF_AUX_ELEM_T(type, id, tag, val...)
Define an auxiliary vector element.
Definition elf_aux.h:56

Definition at line 56 of file elf_aux.h.

## Enumeration Type Documentation

## anonymous enum

anonymous enum

Enumerator
L4RE_ELF_AUX_T_NONE | Tag for an invalid element in the auxiliary vector.
L4RE_ELF_AUX_T_VMA | Tag for descriptor for a reserved virtual memory area.
L4RE_ELF_AUX_T_STACK_SIZE | Tag for descriptor that defines the stack size for the first application thread.
L4RE_ELF_AUX_T_STACK_ADDR | Tag for descriptor that defines the stack address for the first application thread.
L4RE_ELF_AUX_T_KIP_ADDR | Tag for descriptor that defines the KIP address for the binaries address space.
L4RE_ELF_AUX_T_EX_REGS_FLAGS | Tag for descriptor to override ex_regs() flags.

Definition at line 59 of file elf_aux.h.