We already call current_dfmt->init in the same place (at the very end
of ofmt->init) in all the backends that do it; instead call it
centrally in nasm.c after ofmt->init.
This fixes invalid ELF files with when compiling with -F dwarf, since
the dwarf initialization routine never got called.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
init_labels();
ofmt->init(ofile, report_error, define_label, evaluate);
+ ofmt->current_dfmt->init(ofmt, NULL, ofile, report_error);
assemble_file(inname, depend_ptr);
dbgsect = NULL;
(void)ldef;
fprintf(fp, "NASM Output format debug dump\n");
- of_dbg.current_dfmt->init(&of_dbg, 0, fp, errfunc);
-
}
static void dbg_cleanup(int debuginfo)
ieee_entry_seg = NO_SEG;
ieee_uppercase = false;
checksum = 0;
- of_ieee.current_dfmt->init(&of_ieee, NULL, fp, errfunc);
}
+
static int ieee_set_info(enum geninfo type, char **val)
{
(void)type;
obj_use32 = false;
passtwo = 0;
current_seg = NULL;
-
- of_obj.current_dfmt->init(&of_obj, NULL, fp, errfunc);
}
static int obj_set_info(enum geninfo type, char **val)