Main Page | Class List | Directories | File List | Class Members | File Members

ld_object.h File Reference

CKPM linker object manipulation definitions. More...

#include "cklf.h"

Classes

struct  _ld_sym
 a liked list of linker symbols More...
struct  _ld_rel_text
 a linked list of relocation entries More...
struct  _ld_link_obj
 a linked list of cklf object file information for linke editing More...
struct  _ld_link_mgmt
 contains link management information More...

Functions

_ld_symLdSym_Create (char *name, int val, int size, int typ, int bnd, struct _ld_sym *nxt)
 create a linker symbol list entry
void LdSym_Destroy (struct _ld_sym *lds)
 destroy a linker symbol list entry
void LdSym_Dump (struct _ld_sym *lds, int fd)
 dump the entire linker symbol list
_ld_symLdSym_Find (struct _ld_sym *lds, char *n)
 find a linker symbol in the list
int CKLF_Store (int fd_err, char *fname, char *data, int datsz, char *code, int codsz, struct _ld_sym *lds)
 create a CKLF file from compiled code, data and symbol table
int CKLF_Load (int fd_err, char *fname, char *mem, int memsz, int *start)
 load a CKLF file
int CKLF_Link (int fd_err, int verbose, char *ofile, int nr, char **ifiles)
 link a set of CKLF files


Detailed Description

CKPM linker object manipulation definitions.


Function Documentation

int CKLF_Link int  fd_err,
int  verbose,
char *  ofile,
int  nr,
char **  ifiles
 

link a set of CKLF files

Parameters:
fd_err a file discriptor index to an open file for error output
verbose if != 0 this function will provide verbose output
ofile the file name of the linked file
nr the number of files to be linked
ifiles the names of the files to be linked
Returns:
!= 0 on success, otherwise 0

int CKLF_Load int  fd_err,
char *  fname,
char *  mem,
int  memsz,
int *  start
 

load a CKLF file

Parameters:
fd_err a file discriptor index to an open file for error output
fname the file to be loaded
mem the memory of the virtual machine
memsz the size of the virtual machine memory
start the start of the program, i.e. function main() (output)
Returns:
allocated memory on success, otherwise 0

int CKLF_Store int  fd_err,
char *  fname,
char *  data,
int  datsz,
char *  code,
int  codsz,
struct _ld_sym lds
 

create a CKLF file from compiled code, data and symbol table

Parameters:
fd_err a file discriptor index to an open file for error output
fname the name of the file for saving
data the area of initialised data
datsz the size of this data area
code the compiled code
codsz the size of this code area
lds a pointer to the linker symbol table
Returns:
<0 on failure during I/O, otherwise all ran ok.

struct _ld_sym* LdSym_Create char *  name,
int  val,
int  size,
int  typ,
int  bnd,
struct _ld_sym nxt
 

create a linker symbol list entry

Parameters:
name the symbol name
val the symbol value
size the symbol size
typ the symbol type
bnd the symbol binding information
nxt a pointer to the next node
Returns:
a pointer to the newly created symbol list entry

void LdSym_Destroy struct _ld_sym lds  ) 
 

destroy a linker symbol list entry

Parameters:
lds a pointer to the linker symbol table

void LdSym_Dump struct _ld_sym lds,
int  fd
 

dump the entire linker symbol list

Parameters:
lds a pointer to the linker symbol table
fd a filedescriptor index of an open file

struct _ld_sym* LdSym_Find struct _ld_sym lds,
char *  n
 

find a linker symbol in the list

Parameters:
lds the linker symbol list
n the symbol name
Returns:
a pointer to the entry or 0 if none was found


Generated on Thu Jul 13 03:56:36 2006 for CKPMcc by  doxygen 1.4.4