diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-12-18 18:28:23 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-01-15 15:11:36 -0800 |
| commit | 766284fec8184e7765b9a7900aea1a7494214153 (patch) | |
| tree | 85ff71a3e4d28f684f108e3e50d0a2b4ef0b3c8c /src/Compilation.zig | |
| parent | 3cb00c5bcd3dec191bea0cbab9fcac77c0e3a910 (diff) | |
| download | zig-766284fec8184e7765b9a7900aea1a7494214153.tar.gz zig-766284fec8184e7765b9a7900aea1a7494214153.zip | |
wasm linker: fix data segments memory flow
Recognize three distinct phases:
* before prelink ("object phase")
* after prelink, before flush ("zcu phase")
* during flush ("flush phase")
With this setup, we create data structures during the object phase, then
mutate them during the zcu phase, and then further mutate them during
the flush phase. In order to make the flush phase repeatable, the data
structures are copied just before starting the flush phase.
Further Zcu updates occur against the non-copied data structures.
What's not implemented is frontend garbage collection, in which case
some more changes will be needed in this linker logic to achieve a valid
state with data invariants intact.
Diffstat (limited to 'src/Compilation.zig')
0 files changed, 0 insertions, 0 deletions
