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.
f8d1efd99aLuuk de Gram committed on 1/12/2023, 7:50:18 PMparent1072f82
2 files changedLine totals unavailable