static void coff_gen_init(FILE *fp, efunc errfunc) { coffp = fp; error = errfunc; sects = NULL; nsects = sectlen = 0; syms = saa_init((long)sizeof(struct Symbol)); nsyms = 0; bsym = raa_init(); symval = raa_init(); strs = saa_init(1L); strslen = 0; def_seg = seg_alloc(); }
static void as86_init(void) { stext.data = saa_init(1L); stext.datalen = 0L; stext.head = stext.last = NULL; stext.tail = &stext.head; sdata.data = saa_init(1L); sdata.datalen = 0L; sdata.head = sdata.last = NULL; sdata.tail = &sdata.head; bsslen = stext.len = stext.datalen = stext.size = sdata.len = sdata.datalen = sdata.size = 0; stext.index = seg_alloc(); sdata.index = seg_alloc(); bssindex = seg_alloc(); syms = saa_init((int32_t)sizeof(struct Symbol)); nsyms = 0; bsym = raa_init(); strs = saa_init(1L); strslen = 0; /* as86 module name = input file minus extension */ as86_add_string(filename_set_extension(inname, "")); }
static void aoutg_init(FILE * fp, efunc errfunc, ldfunc ldef, evalfunc eval) { aoutfp = fp; error = errfunc; evaluate = eval; (void)ldef; /* placate optimisers */ stext.data = saa_init(1L); stext.head = NULL; stext.tail = &stext.head; sdata.data = saa_init(1L); sdata.head = NULL; sdata.tail = &sdata.head; stext.len = stext.size = sdata.len = sdata.size = sbss.len = 0; stext.nrelocs = sdata.nrelocs = 0; stext.gsyms = sdata.gsyms = sbss.gsyms = NULL; stext.index = seg_alloc(); sdata.index = seg_alloc(); sbss.index = seg_alloc(); stext.asym = sdata.asym = sbss.asym = NULL; syms = saa_init((long)sizeof(struct Symbol)); nsyms = 0; bsym = raa_init(); strs = saa_init(1L); strslen = 0; fwds = NULL; }
static void as86_init(FILE *fp, efunc errfunc, ldfunc ldef, evalfunc eval) { as86fp = fp; error = errfunc; (void) ldef; /* placate optimisers */ stext.data = saa_init(1L); stext.datalen = 0L; stext.head = stext.last = NULL; stext.tail = &stext.head; sdata.data = saa_init(1L); sdata.datalen = 0L; sdata.head = sdata.last = NULL; sdata.tail = &sdata.head; bsslen = stext.len = stext.datalen = stext.size = sdata.len = sdata.datalen = sdata.size = 0; stext.index = seg_alloc(); sdata.index = seg_alloc(); bssindex = seg_alloc(); syms = saa_init((long)sizeof(struct Symbol)); nsyms = 0; bsym = raa_init(); strs = saa_init(1L); strslen = 0; as86_add_string (as86_module); }
static void elf_init(FILE * fp, efunc errfunc, ldfunc ldef, evalfunc eval) { elffp = fp; error = errfunc; evaluate = eval; (void)ldef; /* placate optimisers */ sects = NULL; nsects = sectlen = 0; syms = saa_init((long)sizeof(struct Symbol)); nlocals = nglobs = 0; bsym = raa_init(); strs = saa_init(1L); saa_wbytes(strs, "\0", 1L); saa_wbytes(strs, elf_module, (long)(strlen(elf_module) + 1)); strslen = 2 + strlen(elf_module); shstrtab = NULL; shstrtablen = shstrtabsize = 0;; add_sectname("", ""); fwds = NULL; elf_gotpc_sect = seg_alloc(); ldef("..gotpc", elf_gotpc_sect + 1, 0L, NULL, FALSE, FALSE, &of_elf, error); elf_gotoff_sect = seg_alloc(); ldef("..gotoff", elf_gotoff_sect + 1, 0L, NULL, FALSE, FALSE, &of_elf, error); elf_got_sect = seg_alloc(); ldef("..got", elf_got_sect + 1, 0L, NULL, FALSE, FALSE, &of_elf, error); elf_plt_sect = seg_alloc(); ldef("..plt", elf_plt_sect + 1, 0L, NULL, FALSE, FALSE, &of_elf, error); elf_sym_sect = seg_alloc(); ldef("..sym", elf_sym_sect + 1, 0L, NULL, FALSE, FALSE, &of_elf, error); def_seg = seg_alloc(); }
static void as86_init(void) { stext.data = saa_init(1L); stext.datalen = 0L; stext.head = stext.last = NULL; stext.tail = &stext.head; sdata.data = saa_init(1L); sdata.datalen = 0L; sdata.head = sdata.last = NULL; sdata.tail = &sdata.head; bsslen = stext.len = stext.datalen = stext.size = sdata.len = sdata.datalen = sdata.size = 0; stext.index = seg_alloc(); sdata.index = seg_alloc(); bssindex = seg_alloc(); syms = saa_init((int32_t)sizeof(struct Symbol)); nsyms = 0; bsym = raa_init(); strs = saa_init(1L); strslen = 0; as86_add_string(as86_module); }