QuakeForge  0.7.2.210-815cf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Object file functions

Modules

 Object file type encoding
 All pointer_t type fields are pointers within the type qfo_space.
 
 QFO Data Acess
 Macros for accessing data in the QFO address space.
 
 QFOD flags
 

Data Structures

struct  qfo_def_s
 Representation of a def in the object file. More...
 
struct  qfo_func_s
 Representation of a function in the object file. More...
 
struct  qfo_header_s
 Header block of QFO object files. More...
 
struct  qfo_mspace_s
 In-memory representation of a QFO space. More...
 
struct  qfo_reloc_s
 Evil source of many headaches. More...
 
struct  qfo_s
 In-memory representation of a QFO object file. More...
 
struct  qfo_space_s
 Representation of a space in the object file. More...
 

Macros

#define QFO
 Identifier string for qfo object files (includes terminating nul) More...
 
#define QFO_VERSION
 QFO object file format version (MMmmmRRR 0.001.006 (hex)) More...
 

Typedefs

typedef struct qfo_def_s qfo_def_t
 Representation of a def in the object file. More...
 
typedef struct qfo_func_s qfo_func_t
 Representation of a function in the object file. More...
 
typedef struct qfo_header_s qfo_header_t
 Header block of QFO object files. More...
 
typedef struct qfo_mspace_s qfo_mspace_t
 In-memory representation of a QFO space. More...
 
typedef struct qfo_reloc_s qfo_reloc_t
 Evil source of many headaches. More...
 
typedef struct qfo_space_s qfo_space_t
 Representation of a space in the object file. More...
 
typedef struct qfo_s qfo_t
 In-memory representation of a QFO object file. More...
 
typedef enum qfos_type_e qfos_type_t
 

Enumerations

enum  {
  qfo_null_space, qfo_strings_space, qfo_code_space, qfo_near_data_space,
  qfo_far_data_space, qfo_entity_space, qfo_type_space, qfo_num_spaces
}
 
enum  qfos_type_e {
  qfos_null, qfos_code, qfos_data, qfos_string,
  qfos_entity, qfos_type
}
 

Functions

void qfo_delete (qfo_t *qfo)
 Delete a qfo_t struct, as well as any substructure data. More...
 
qfo_tqfo_from_progs (struct pr_info_s *pr)
 Convert pr_info_t structure to qfo_t. More...
 
qfo_tqfo_new (void)
 Create a new qfo_t struct. More...
 
qfo_tqfo_open (const char *filename)
 Wrapper around qfo_read() to allow reading from a named file. More...
 
qfo_tqfo_read (QFile *file)
 Read a qfo_t strcut from a QFile stream. More...
 
dprograms_tqfo_to_progs (qfo_t *qfo, int *size)
 
pr_debug_header_tqfo_to_sym (qfo_t *qfo, int *size)
 
int qfo_write (qfo_t *qfo, const char *filename)
 Write a qfo_t struct to the named file. More...
 

Detailed Description

Macro Definition Documentation

#define QFO

Identifier string for qfo object files (includes terminating nul)

#define QFO_VERSION

QFO object file format version (MMmmmRRR 0.001.006 (hex))

Typedef Documentation

typedef struct qfo_def_s qfo_def_t

Representation of a def in the object file.

typedef struct qfo_func_s qfo_func_t

Representation of a function in the object file.

typedef struct qfo_header_s qfo_header_t

Header block of QFO object files.

The sections of the object file come immediately after the header, and are always in the order given by the struct.

All indices to records are 0-based from the beginning of the relevant section.

typedef struct qfo_mspace_s qfo_mspace_t

In-memory representation of a QFO space.

typedef struct qfo_reloc_s qfo_reloc_t

Evil source of many headaches.

The whole reason I've started writing this documentation. relocs are always in the order: referenced relocs unreferenced relocs

For ref_op_* relocation types, ofs is the code section address of the statement that needs to be adjusted.

For rel_def_* relocation types, ofs refers to the data section address of the word that needs to be adjusted.

For ref_*_def(_ofs) relocation types, def is the index of the referenced def.

For ref_*_op relocation types, def is the address of the referenced statement.

For ref_*_string relocation types, def is always 0.

For ref_*_field(_ofs) relocation types, def is the index of the referenced field def.

typedef struct qfo_space_s qfo_space_t

Representation of a space in the object file.

typedef struct qfo_s qfo_t

In-memory representation of a QFO object file.

typedef enum qfos_type_e qfos_type_t

Enumeration Type Documentation

anonymous enum
Enumerator
qfo_null_space 
qfo_strings_space 
qfo_code_space 
qfo_near_data_space 
qfo_far_data_space 
qfo_entity_space 
qfo_type_space 
qfo_num_spaces 
Enumerator
qfos_null 

null space. no data or defs. first in qfo

qfos_code 

progs code. dstatement_t data

qfos_data 

progs data. pr_type_t data

qfos_string 

strings. char data

qfos_entity 

entity field defs. no data

qfos_type 

type encodings

Function Documentation

void qfo_delete ( qfo_t qfo)

Delete a qfo_t struct, as well as any substructure data.

Parameters
qfoqfo_t struct to delete
qfo_t* qfo_from_progs ( struct pr_info_s pr)

Convert pr_info_t structure to qfo_t.

Parameters
prpointer to pr_info_t struct
Returns
pointer to new qfo_t struct, or 0 on error.
qfo_t* qfo_new ( void  )

Create a new qfo_t struct.

Returns
pointer to new qfo_t struct, or 0 on error.
qfo_t* qfo_open ( const char *  filename)

Wrapper around qfo_read() to allow reading from a named file.

Parameters
filenamename of the file to read
Returns
pointer to new qfo_t struct, or 0 on error.
qfo_t* qfo_read ( QFile file)

Read a qfo_t strcut from a QFile stream.

Parameters
fileQFile stream to read from
Returns
pointer to new qfo_t struct, or 0 on error.
dprograms_t* qfo_to_progs ( qfo_t qfo,
int size 
)
pr_debug_header_t* qfo_to_sym ( qfo_t qfo,
int size 
)
int qfo_write ( qfo_t qfo,
const char *  filename 
)

Write a qfo_t struct to the named file.

Parameters
qfopointer to qfo_t struct to write
filenamename of the file to write
Returns
0 for success, -1 for error.