# wasm-linker: Prevent overalignment for segments · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/d66c61a2cf69665223815a1a12a1f93b30b99571)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: d66c61a2cf69665223815a1a12a1f93b30b99571

Requested commit: d66c61a2cf69665223815a1a12a1f93b30b99571

Commit: d66c61a2cf69665223815a1a12a1f93b30b99571

Tree: 2f969fb2733eadc8ae16088ce98b0b19a5841ce8

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm-linker: Prevent overalignment for segments

Previously, the data segments were being aligned twice.
This caused us to overalign the segment and therefore allocate a much larger
size for each segment than was required. This fix ensures we align and set the size
just once, ensuring semantically correct binaries as well as smaller binaries.

```

## Parents

- [cf37101108e56412e958a8b597bae84649893b6f](https://git.cafe/gitcafe/zig/commit/cf37101108e56412e958a8b597bae84649893b6f?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/d66c61a2cf69665223815a1a12a1f93b30b99571?format=markdown)
