/*@null@*/ /*@dependent@*/ static yasm_preproc *cur_preproc = NULL;
/*@null@*/ /*@dependent@*/ static const yasm_preproc_module *
cur_preproc_module = NULL;
+/*@null@*/ static char *objfmt_keyword = NULL;
/*@null@*/ /*@dependent@*/ static yasm_objfmt *cur_objfmt = NULL;
/*@null@*/ /*@dependent@*/ static const yasm_objfmt_module *
cur_objfmt_module = NULL;
yasm_xfree(list_filename);
if (machine_name)
yasm_xfree(machine_name);
+ if (objfmt_keyword)
+ yasm_xfree(objfmt_keyword);
}
}
_("object format"), param);
exit(EXIT_FAILURE);
}
+ if (objfmt_keyword)
+ yasm_xfree(objfmt_keyword);
+ objfmt_keyword = yasm__xstrdup(param);
return 0;
}
apply_preproc_builtins()
{
char *predef;
- const char *objfmt_keyword = DEFAULT_OBJFMT_MODULE;
- if (cur_objfmt_module)
- objfmt_keyword = cur_objfmt_module->keyword;
+ if (!objfmt_keyword)
+ objfmt_keyword = yasm__xstrdup(DEFAULT_OBJFMT_MODULE);
/* Define standard YASM assembly-time macro constants */
predef = yasm_xmalloc(strlen("__YASM_OBJFMT__=")
TESTS += modules/objfmts/elf/tests/elf_test.sh
EXTRA_DIST += modules/objfmts/elf/tests/elf_test.sh
+EXTRA_DIST += modules/objfmts/elf/tests/elfcond.asm
+EXTRA_DIST += modules/objfmts/elf/tests/elfcond.hex
+EXTRA_DIST += modules/objfmts/elf/tests/elfcond.errwarn
EXTRA_DIST += modules/objfmts/elf/tests/elfsectalign.asm
EXTRA_DIST += modules/objfmts/elf/tests/elfsectalign.hex
EXTRA_DIST += modules/objfmts/elf/tests/elfsectalign.errwarn