#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include "cpp_io.h"
#include "cpp_conv.h"
#include "ld_object.h"
#include "cklf.h"
Functions | |
_ld_sym * | LdSym_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_sym * | LdSym_Find (struct _ld_sym *lds, char *n) |
find a linker symbol in the list | |
int | LdSym_Length (struct _ld_sym *lds) |
determine the length of the symbol list | |
int | LdSym_StrLength (struct _ld_sym *lds) |
determine the length of the symbol list strings | |
_ld_link_mgmt * | LdMgmt_Create () |
create a struct _ld_link_mgmt on the heap | |
void | LdMgmt_Destroy (struct _ld_link_mgmt *m) |
destroy a struct _ld_link_mgmt on the heap | |
int | Ld_Align (int a, int b) |
alignment calculation | |
int | Ld_Read_Long (char *c, int at) |
read four bytes from the code at a given address | |
void | Ld_Write_Long (char *c, int at, int with) |
write four bytes to the code | |
void | Ld_Fix_Link_Long (char *c, int dst, int l, int o) |
do the branch destination fixup | |
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 | |
_ld_link_obj * | CKLF_Load_File_Info (int fd_err, int nr, char **ifiles) |
load the headers from cklf files and create a struct _ld_link_obj list | |
int | CKLF_Load_Files (int fd_err, struct _ld_link_mgmt *m) |
load code and data segments for linking | |
int | CKLF_Merge_Chains (char *s, int old_chain, int new_chain, int offs) |
join a link chain with an existing link chain and correct the offsets | |
void | CKLF_Create_SymTab (int fd_err, struct _ld_link_mgmt *m) |
join the symbol tables of all loaded files | |
int | CKLF_Link (int fd_err, int verbose, char *ofile, int nr, char **ifiles) |
link a set of CKLF files |
|
join the symbol tables of all loaded files
|
|
link a set of CKLF files
|
|
load a CKLF file
|
|
load the headers from cklf files and create a struct _ld_link_obj list
|
|
load code and data segments for linking
|
|
join a link chain with an existing link chain and correct the offsets
|
|
create a CKLF file from compiled code, data and symbol table
|
|
alignment calculation
|
|
do the branch destination fixup
|
|
read four bytes from the code at a given address
|
|
write four bytes to the code
|
|
create a struct _ld_link_mgmt on the heap
|
|
destroy a struct _ld_link_mgmt on the heap
|
|
create a linker symbol list entry
|
|
destroy a linker symbol list entry
|
|
dump the entire linker symbol list
|
|
find a linker symbol in the list
|
|
determine the length of the symbol list
|
|
determine the length of the symbol list strings
|