svn commit: r1149 - in trunk/yasm: libyasm modules/arch/x86 modules/objfmts modules/objfmts/coff modules/objfmts/elf modules/objfmts/xdf tools/xdf

peter at peter at
Sun Sep 26 21:15:13 PDT 2004

Author: peter
Date: Sun Sep 26 21:15:12 2004
New Revision: 1149

   trunk/yasm/modules/objfmts/xdf/   (contents, props changed)
   trunk/yasm/modules/objfmts/xdf/xdf-objfmt.c   (contents, props changed)
   trunk/yasm/tools/xdf/xdf.h   (contents, props changed)
   trunk/yasm/tools/xdf/xdfdump.c   (contents, props changed)
* expr.c (yasm_expr_extract_symrec): Add "relocate" parameter.  Use it to
control whether the symbol is replaced with the symbol's value (old
behavior), or just replace it with 0 (new optional behavior).  The old
behavior is enabled by setting relocate=1.
* expr.h (yasm_expr_extract_symrec): Likewise (and document new behavior).
* elf-objfmt.c (elf_objfmt_output_expr): Use new function (with relocate=1).
* coff-objfmt.c (coff_objfmt_output_expr): Likewise.

* expr.c (yasm_expr_extract_segment): Renamed to yasm_expr_extract_segoff, a
more approprate name given what operator it looks at.
* expr.h (yasm_expr_extract_segment): Likewise.
* x86bc.c (x86_bc_jmp_tobytes): Use new function name.

* expr.c (yasm_expr_extract_seg): New function to remove SEG unary operator.
* expr.h (yasm_expr_extract_seg): Likewise.

* expr.c (yasm_expr_extract_shr): New function to split SHR operator into
left and right halves.
* expr.h (yasm_expr_extract_shr): Likewise.

* xdf.h: New header file describing the newly added Extended Dynamic Object
Format (XDF).  Note: GCC-only code.
* xdfdump.c: New utility that uses the format described in xdf.h to
completely dump an XDF file.  Note: non-portable code (runs correctly on
little endian machines only).
Neither of these files are currently included in the distribution.

* xdf-objfmt.c: New YASM objfmt module to output XDF format object files.
* modules/objfmts/xdf/ Add to build.
* modules/objfmts/ Likewise.

The XDF object format is a blend between COFF and OMF.  It is a very simple
object format intended for use by operating system loaders or similar types
of targets.  It allows shifted relocations (useful for static interrupt or
page tables), both flat and segment-relative, and the use of the SEG, WRT,
and x86 JMP FAR notations.

Test cases will be committed soon.

More information about the yasm-cvs mailing list