- lowers @llvm.global_dtors by adding @llvm.global_ctors functions which register the destructors with __cxa_atexit.
- impements @llvm.global_ctors with wasm start functions and linker metadata
This is simpler version of https://reviews.llvm.org/D41211 that doesn't use the start
section and builds on the already-landed change for supporting the extra meta data
in the linking section.
See here for more background.
This is a whopping method already... at some point it should be split up, and we could at least avoid inlining another big independent bit of functionality.