aboutsummaryrefslogtreecommitdiff
path: root/lib/std/bounded_array.zig
diff options
context:
space:
mode:
authorLuuk de Gram <luuk@degram.dev>2022-01-11 20:35:44 +0100
committerLuuk de Gram <luuk@degram.dev>2022-01-11 20:35:44 +0100
commit975049e96e2245022a90368360fe7f3617e5f194 (patch)
tree3622e219db6c2ffa73f0541f4ec1fe101ab0cbb4 /lib/std/bounded_array.zig
parentf767f8e3dc158a74debdd288884458b860d2ebc9 (diff)
downloadzig-975049e96e2245022a90368360fe7f3617e5f194.tar.gz
zig-975049e96e2245022a90368360fe7f3617e5f194.zip
wasm-ld: Append `--stack-first` by default
By placing the stack at the start of the memory section, we prevent the runtime from silently overwriting the global declarations and instead trap. We do however, allow users to overwrite this behavior by setting the global-base, which puts the stack at the end of the memory section and the static data at the base that was specified. The reason a user would want to do this, is when they are sure the stack will not overflow and they want to decrease the binary size as the offsets to the static memory are generally smaller. (Having the stack in front, means that accessing the memory after the stack has a bigger offset when loading/storing from memory).
Diffstat (limited to 'lib/std/bounded_array.zig')
0 files changed, 0 insertions, 0 deletions