]> granicus.if.org Git - yasm/commit
* coff-objfmt.c (win32_objfmt_directive): New function that implements the
authorPeter Johnson <peter@tortall.net>
Sat, 29 Jan 2005 10:24:23 +0000 (10:24 -0000)
committerPeter Johnson <peter@tortall.net>
Sat, 29 Jan 2005 10:24:23 +0000 (10:24 -0000)
commita7b3e155882f0c543504fc80de6abd8542af0331
tree6aeb5ae743184c39359bf5558a5c81f35d5ffd2b
parent8c9c42b651b7b153903164a4dc18a838f6f8ef1e
* coff-objfmt.c (win32_objfmt_directive): New function that implements the
undocumented (in NASM) win32 object format "export" directive.
(yasm_win32_LTX_objfmt): Reference above instead of coff_objfmt_directive.
(coff_objfmt_section_switch): Add support for ".drectve" section.
(coff_objfmt_init_new_section): Refactored from coff_objfmt_section_switch.

* preproc.h (yasm_preproc_module): Add define_builtin for defining macros
before standard.mac macros are processed.
(yasm_preproc_builtin_define): Add prototype and macro to call above.
* raw-preproc.c (raw_preproc_define_builtin): Add (empty).
(yasm_raw_LTX_preproc): Use.
* nasm-preproc.c (nasm_preproc_define_builtin): Add wrapper around new
pp_builtin_define.
(yasm_nasm_LTX_preproc): Use.
* nasm-pp.h (pp_builtin_define): Add prototype.
* nasm-pp.c (builtindef): New list of builtin definitions.
(read_line): Iterate through builtindef.
(pp_builtin_define): Add to builtindef.

* standard.mac: Add wrapper around definition of ORG (only for bin objfmt),
add wrappered EXPORT definition.
* yasm.c (apply_preproc_builtins): Define __YASM_OBJFMT__ to selected objfmt.
(main): Call above in correct places.

* export.asm, export.hex, export.errwarn: New test for use of "export" macro
and directive.

svn path=/trunk/yasm/; revision=1199
12 files changed:
frontends/yasm/yasm.c
libyasm/preproc.h
modules/objfmts/coff/coff-objfmt.c
modules/objfmts/win32/tests/Makefile.inc
modules/objfmts/win32/tests/export.asm [new file with mode: 0644]
modules/objfmts/win32/tests/export.errwarn [new file with mode: 0644]
modules/objfmts/win32/tests/export.hex [new file with mode: 0644]
modules/preprocs/nasm/nasm-pp.c
modules/preprocs/nasm/nasm-pp.h
modules/preprocs/nasm/nasm-preproc.c
modules/preprocs/nasm/standard.mac
modules/preprocs/raw/raw-preproc.c