- fseek (file, secth [SECT_DEBUG_FRAME].sh_offset, SEEK_SET);
- if (sections [SECT_DEBUG_FRAME])
- fwrite (sections [SECT_DEBUG_FRAME]->data, sections [SECT_DEBUG_FRAME]->cur_offset, 1, file);
- fseek (file, secth [SECT_DEBUG_INFO].sh_offset, SEEK_SET);
- if (sections [SECT_DEBUG_INFO])
- fwrite (sections [SECT_DEBUG_INFO]->data, sections [SECT_DEBUG_INFO]->cur_offset, 1, file);
- fseek (file, secth [SECT_DEBUG_ABBREV].sh_offset, SEEK_SET);
- if (sections [SECT_DEBUG_ABBREV])
- fwrite (sections [SECT_DEBUG_ABBREV]->data, sections [SECT_DEBUG_ABBREV]->cur_offset, 1, file);
- fseek (file, secth [SECT_DEBUG_LINE].sh_offset, SEEK_SET);
- if (sections [SECT_DEBUG_LINE])
- fwrite (sections [SECT_DEBUG_LINE]->data, sections [SECT_DEBUG_LINE]->cur_offset, 1, file);
- fseek (file, secth [SECT_DEBUG_LINE].sh_offset, SEEK_SET);
- if (sections [SECT_DEBUG_LOC])
- fwrite (sections [SECT_DEBUG_LOC]->data, sections [SECT_DEBUG_LOC]->cur_offset, 1, file);
- fseek (file, secth [SECT_SHSTRTAB].sh_offset, SEEK_SET);
- fwrite (sh_str_table.data->str, sh_str_table.data->len, 1, file);
- fseek (file, secth [SECT_SYMTAB].sh_offset, SEEK_SET);
- fwrite (symtab, sizeof (ElfSymbol) * num_local_syms, 1, file);
- fseek (file, secth [SECT_STRTAB].sh_offset, SEEK_SET);
- fwrite (str_table.data->str, str_table.data->len, 1, file);
+ bin_writer_fseek (acfg, secth [SECT_SHSTRTAB].sh_offset);
+ bin_writer_fwrite (acfg, sh_str_table.data->str, sh_str_table.data->len, 1);
+ bin_writer_fseek (acfg, secth [SECT_SYMTAB].sh_offset);
+ bin_writer_fwrite (acfg, symtab, sizeof (ElfSymbol) * num_local_syms, 1);
+ bin_writer_fseek (acfg, secth [SECT_STRTAB].sh_offset);
+ bin_writer_fwrite (acfg, str_table.data->str, str_table.data->len, 1);