mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
wasm linker: omit data count section when value is zero
This commit is contained in:
parent
744bb5d16a
commit
605311211b
@ -820,7 +820,7 @@ pub fn finish(f: *Flush, wasm: *Wasm) !void {
|
||||
}
|
||||
|
||||
// When the shared-memory option is enabled, we *must* emit the 'data count' section.
|
||||
{
|
||||
if (f.data_segment_groups.items.len > 0) {
|
||||
const header_offset = try reserveVecSectionHeader(gpa, binary_bytes);
|
||||
replaceVecSectionHeader(binary_bytes, header_offset, .data_count, @intCast(f.data_segment_groups.items.len));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user