diff options
| author | Luuk de Gram <luuk@degram.dev> | 2023-01-11 07:03:15 +0100 |
|---|---|---|
| committer | Luuk de Gram <luuk@degram.dev> | 2023-01-12 20:50:18 +0100 |
| commit | f8d1efd99ab0ff9ae49a17b437814f4fe329e83b (patch) | |
| tree | 411dca0d212597b6498098146a2429a75de04490 /lib/std | |
| parent | 1072f82acbe976222851bdd357f52dd9659d73d3 (diff) | |
| download | zig-f8d1efd99ab0ff9ae49a17b437814f4fe329e83b.tar.gz zig-f8d1efd99ab0ff9ae49a17b437814f4fe329e83b.zip | |
wasm-linker: implement __wasm_call_ctors symbol
This implements the `__wasm_call_ctors` symbol. This symbol is
automatically referenced by libc to initialize its constructors.
We first retrieve all constructors from each object file, and then
create a function body that calls each constructor based on its
priority. Constructors are not allowed to have any parameters, but are
allowed to have a return type. When a return type does exist, we simply
drop its value from the stack after calling the constructor to ensure
we pass the stack validator.
Diffstat (limited to 'lib/std')
0 files changed, 0 insertions, 0 deletions
