This change lays the groundwork lowering of @llvm.global_ctors
and @llvm.global_dtors for the wasm object format. Some parts
of this patch are subset of: https://reviews.llvm.org/D40759
See https://github.com/WebAssembly/tool-conventions/issues/25
You've changed the behaviour of parseStartSection, which used to take a function index excluding the imported functions.
Is that deliberate? These indexes are slippery... I would have thought that both parseStartSection and WASM_INIT_FUNCS should only be able to specify a defined function, ie the range should not include the imported functions.