version 1.1.1.1, 2008/06/03 10:38:51 |
version 1.1.1.1.2.1, 2008/08/13 17:12:43 |
|
|
#include <prex/prex.h> |
#include <prex/prex.h> |
#include <prex/elf.h> |
#include <prex/elf.h> |
#include <sys/param.h> |
#include <sys/param.h> |
#include <sys/syslog.h> |
|
#include <sys/stat.h> |
#include <sys/stat.h> |
#include <server/exec.h> |
#include <server/exec.h> |
|
|
#include <unistd.h> |
#include <unistd.h> |
|
|
#ifdef DEBUG |
|
/* #define DEBUG_EXEC 1 */ |
/* #define DEBUG_EXEC 1 */ |
#endif |
|
|
|
#ifdef DEBUG_EXEC |
#ifdef DEBUG_EXEC |
#define dprintf(fmt, args...) syslog(LOG_DEBUG, "exec: " fmt, ## args) |
#define DPRINTF(a) dprintf a |
#else |
#else |
#define dprintf(fmt...) do {} while (0) |
#define DPRINTF(a) |
#endif |
#endif |
|
|
#define PRIO_EXEC 127 |
#define PRIO_EXEC 127 |
|
|
* Definition for exec loader |
* Definition for exec loader |
*/ |
*/ |
struct exec_loader { |
struct exec_loader { |
const char *name; /* name of loader */ |
const char *el_name; /* name of loader */ |
void (*init)(void); /* initialize routine */ |
void (*el_init)(void); /* initialize routine */ |
int (*probe)(void *); /* probe routine */ |
int (*el_probe)(void *); /* probe routine */ |
int (*load)(void *, task_t, int, void **); /* load routine */ |
int (*el_load)(void *, task_t, int, void **entry); /* load routine */ |
}; |
}; |
|
|
|
/* |
|
* Global variables |
|
*/ |
extern object_t proc_obj; |
extern object_t proc_obj; |
extern object_t fs_obj; |
extern object_t fs_obj; |
extern struct exec_loader loader_table[]; |
extern struct exec_loader loader_table[]; |