load.c File Reference

#include "libc.h"


#define LOADERR(Errcode)


void sigcode ()
void esigcode ()
t_load_status load_exec (asid_t asid, char *path, vaddr_t mapaddr, u_int32_t loadopts, u_int32_t *eip)

Define Documentation

#define LOADERR Errcode   ) 


do {\
        errcode = (Errcode);\
        goto bad;\
} while (/*CONSTCOND*/0)

Function Documentation

void esigcode  ) 

t_load_status load_exec asid_t  asid,
char *  path,
vaddr_t  mapaddr,
u_int32_t  loadopts,
u_int32_t eip

By default, the function uses the traditional Unix file system interface to access files (open(3), read(3) and fstat(3)) so only a schedulable task could use them, in the case of a service, see LOADOPT_BOOTFS

This function loads an ELF file into an address space. With LOADOPT_BOOTFS option, this function is able to look in the in core boot file system.

Note in LOADOPT_BOOTFS mode, the in core memory elf headers are used to store some values (e.g where sharable sections are loaded in physical memory). In traditional Unix file system this is impossible so we use prop server to store the location of them.

asid  address space of where to load
path  path of the executable
mapaddr  address to load the file (LOADOPT_AS_IS) or -1
loadopts  loading options
eip  entry point of the exe

void sigcode  ) 

Generated on Wed May 24 23:05:54 2006 for LSE/OS by  doxygen 1.4.6