asm: fix misplaced padding breaking offset calculation in ivy_assembler_finish

This commit is contained in:
2025-05-12 15:50:48 +01:00
parent fe23529c6b
commit 2e4d1e53f3

View File

@@ -109,13 +109,13 @@ enum ivy_status ivy_assembler_finish(struct ivy_assembler *as)
unsigned short nr_table_entries = 0;
pad(as, 16);
struct ivy_bin_header header = {0};
header.h_table_offset = b_i64_htob(as->as_data_offset);
header.h_table_len = b_i16_htob(0);
header.h_magic = b_i32_htob(IVY_BIN_MAGIC);
pad(as, 16);
b_queue_iterator it = {0};
b_queue_foreach (&it, &as->as_table) {
struct asm_table_entry *e