Adding segment and size parameters to yasm_symtab_define*
peter at tortall.net
Mon Sep 29 15:25:02 PDT 2008
On Tue, 30 Sep 2008 00:15:40 +0200, Samuel Thibault wrote
> I'm back working on the tasm support in yasm, I have something
> working with if (tasm_compatible_mode) everywhere so that it
> shouldn't hurt.
> There is one quite invasive modification: I have to add segment and size
> parameters to yasm_symtab_define*, as tasm automatically detects the
> segment and size to be used we dereferencing a variable. That would
> mean adding
> 0, NULL
> to all callers of yasm_symtab_define*. Is that ok, or should I
> rather define a compatibility macro to avoid the invasive change?
Could you do multi-step initialization? E.g. setter functions to set the
segment and size after the symbol is defined? Then the symtab_define()
function could just set the segment and size to zero by default, and only the
TASM code would call the setter functions to set to non-zero values.
More information about the yasm-devel