libyasm/objfmt.h File Reference

YASM object format module interface. More...

Go to the source code of this file.

Data Structures

struct  yasm_objfmt_module
 Object format module interface. More...

Functions

yasm_objfmtyasm_objfmt_create (const yasm_objfmt_module *module, yasm_object *object)
 Create object format.
void yasm_objfmt_output (yasm_object *object, FILE *f, int all_syms, yasm_errwarns *errwarns)
 Write out (post-optimized) sections to the object file.
void yasm_objfmt_destroy (yasm_objfmt *objfmt)
 Cleans up any allocated object format memory.
yasm_sectionyasm_objfmt_add_default_section (yasm_object *object)
 Add a default section to an object.
yasm_sectionyasm_objfmt_section_switch (yasm_object *object, yasm_valparamhead *valparams, yasm_valparamhead *objext_valparams, unsigned long line)
 Switch object file sections.
yasm_symrecyasm_objfmt_get_special_sym (yasm_object *object, const char *name, const char *parser)
 Get a special symbol.


Detailed Description

YASM object format module interface.

Definition in file objfmt.h.


Function Documentation

yasm_section* yasm_objfmt_add_default_section ( yasm_object object  ) 

Add a default section to an object.

Parameters:
object object
Returns:
Default section.

yasm_objfmt* yasm_objfmt_create ( const yasm_objfmt_module module,
yasm_object object 
)

Create object format.

Parameters:
module object format module
object object
Returns:
NULL if architecture/machine combination not supported.

void yasm_objfmt_destroy ( yasm_objfmt objfmt  ) 

Cleans up any allocated object format memory.

Parameters:
objfmt object format

yasm_symrec* yasm_objfmt_get_special_sym ( yasm_object object,
const char *  name,
const char *  parser 
)

Get a special symbol.

Special symbols are generally used to generate special relocation types via the WRT mechanism.

Parameters:
object object
name symbol name (not including any parser-specific prefix)
parser parser keyword
Returns:
NULL if unrecognized, otherwise special symbol.

void yasm_objfmt_output ( yasm_object object,
FILE *  f,
int  all_syms,
yasm_errwarns errwarns 
)

Write out (post-optimized) sections to the object file.

This function may call yasm_symrec_* functions as necessary (including yasm_symrec_traverse()) to retrieve symbolic information.

Parameters:
object object
f output object file
all_syms if nonzero, all symbols should be included in the object file
errwarns error/warning set
Note:
Errors and warnings are stored into errwarns.

yasm_section* yasm_objfmt_section_switch ( yasm_object object,
yasm_valparamhead valparams,
yasm_valparamhead objext_valparams,
unsigned long  line 
)

Switch object file sections.

The first val of the valparams should be the section name. Calls yasm_object_get_general() to actually get the section.

Parameters:
object object
valparams value/parameters
objext_valparams object format-specific value/parameters
line virtual line (from yasm_linemap)
Returns:
NULL on error, otherwise new section.


Generated on Fri Jul 25 01:23:33 2008 for libyasm by  doxygen 1.5.2