NAME ^

src/exec.c - Generate an object file

DESCRIPTION ^

Functions ^

void Parrot_exec(Interp *interpreter, opcode_t *pc, opcode_t *code_start, opcode_t *code_end)

Call the jit to get the program code. Adds the members of the data section. And emits the executable.

static void add_data_member(Parrot_exec_objfile_t *obj, void *src, size_t len)

Adds a member to the data section, storing the size of it at obj->data_size[N].

static void exec_init(Parrot_exec_objfile_t *obj)

Initialize the obj structure.

int Parrot_exec_add_symbol(Parrot_exec_objfile_t *obj, const char *symbol, int stype)

Adds a symbol to the object file.

int *Parrot_exec_add_text_rellocation_reg(Parrot_exec_objfile_t *obj, char *nptr, const char *var, int offset, int disp)

void Parrot_exec_add_text_rellocation_func(Parrot_exec_objfile_t *obj, char *nptr, const char *func_name)

void Parrot_exec_add_text_rellocation(Parrot_exec_objfile_t *obj, char *nptr, int type, const char *symbol, int disp)

Adds a text rellocation to the object file.

static int symbol_list_find(Parrot_exec_objfile_t *obj, const char *symbol)

Returns the index of symbol in the symbol list. Returns -1 if it is not in the list.

Used by Parrot_exec_add_symbol().

SEE ALSO ^

include/parrot/exec.h, src/exec_cpu.c, include/parrot/exec_save.h and src/exec_start.c.

HISTORY ^

Initial version by Daniel Grunblatt on 2003.6.9.


parrot