elfloader-otf.h File Reference

Header file for the Contiki ELF loader. More...

#include "cfs/cfs.h"

Go to the source code of this file.

Data Structures

struct  elfloader_output
 elfloader output object More...

Defines

#define ELFLOADER_OK   0
 Return value from elfloader_load() indicating that loading worked.
#define ELFLOADER_BAD_ELF_HEADER   1
 Return value from elfloader_load() indicating that the ELF file had a bad header.
#define ELFLOADER_NO_SYMTAB   2
 Return value from elfloader_load() indicating that no symbol table could be find in the ELF file.
#define ELFLOADER_NO_STRTAB   3
 Return value from elfloader_load() indicating that no string table could be find in the ELF file.
#define ELFLOADER_NO_TEXT   4
 Return value from elfloader_load() indicating that the size of the .text segment was zero.
#define ELFLOADER_SYMBOL_NOT_FOUND   5
 Return value from elfloader_load() indicating that a symbol specific symbol could not be found.
#define ELFLOADER_SEGMENT_NOT_FOUND   6
 Return value from elfloader_load() indicating that one of the required segments (.data, .bss, or .text) could not be found.
#define ELFLOADER_NO_STARTPOINT   7
 Return value from elfloader_load() indicating that no starting point could be found in the loaded module.
#define ELFLOADER_UNHANDLED_RELOC   8
 Return value from elfloader_load() indicating that the ELF file contained a relocation type that the implementation can't handle.
#define ELFLOADER_OUTOF_RANGE   9
 Return value from elfloader_load() indicating that the offset for a relative addressing mode was too big.
#define ELFLOADER_RELOC_NOT_SORTED   10
 Return value from elfloader_load() indicating that the relocations where not sorted by offset.
#define ELFLOADER_INPUT_ERROR   11
 Return value from elfloader_load() indicating that reading from the ELF file failed in some way.
#define ELFLOADER_OUTPUT_ERROR   12
 Return value from elfloader_load() indicating that writing to a segment failed.

Functions

void * elfloader_allocate_segment (struct elfloader_output *output, unsigned int type, int size)
 Allocate a new segment.
int elfloader_start_segment (struct elfloader_output *output, unsigned int type, void *addr, int size)
 Start writing to a new segment.
int elfloader_end_segment (struct elfloader_output *output)
 Mark end of segment.
int elfloader_write_segment (struct elfloader_output *output, const char *buf, unsigned int len)
 Write data to a segment.
unsigned int elfloader_segment_offset (struct elfloader_output *output)
 Get the current offset in the file where the next data will be written.
void elfloader_init (void)
 elfloader initialization function.
int elfloader_load (int input_fd, struct elfloader_output *output)
 Load and relocate an ELF file.

Variables

struct process ** elfloader_autostart_processes
 A pointer to the processes loaded with elfloader_load().
char elfloader_unknown [30]
 If elfloader_load() could not find a specific symbol, it is copied into this array.

Detailed Description

Header file for the Contiki ELF loader.

Author:
Adam Dunkels <adam@sics.se> Simon Berg <ksb@users.sourceforge.net>

Definition in file elfloader-otf.h.


Generated on Mon Apr 11 14:23:47 2011 for Contiki 2.5 by  doxygen 1.6.1