+ /* ensure all data is in LE format */
+ util_endianswap(&code_header.version, 1, sizeof(code_header.version));
+ util_endianswap(&code_header.crc16, 1, sizeof(code_header.crc16));
+ util_endianswap(&code_header.statements, 2, sizeof(code_header.statements.offset));
+ util_endianswap(&code_header.defs, 2, sizeof(code_header.statements.offset));
+ util_endianswap(&code_header.fields, 2, sizeof(code_header.statements.offset));
+ util_endianswap(&code_header.functions, 2, sizeof(code_header.statements.offset));
+ util_endianswap(&code_header.strings, 2, sizeof(code_header.statements.offset));
+ util_endianswap(&code_header.globals, 2, sizeof(code_header.statements.offset));
+ util_endianswap(&code_header.entfield, 1, sizeof(code_header.entfield));
+ util_endianswap(code->statements, vec_size(code->statements), sizeof(prog_section_statement));
+ util_endianswap(code->defs, vec_size(code->defs), sizeof(prog_section_def));
+ util_endianswap(code->fields, vec_size(code->fields), sizeof(prog_section_field));
+ util_endianswap(code->functions, vec_size(code->functions), sizeof(prog_section_function));
+ util_endianswap(code->globals, vec_size(code->globals), sizeof(int32_t));
+