[WebAssembly] MC: Support for init_array and fini_array

Differential Revision: https://reviews.llvm.org/D37757

llvm-svn: 314783
This commit is contained in:
Sam Clegg
2017-10-03 11:20:28 +00:00
parent d932b2d763
commit b2b019f727
2 changed files with 101 additions and 3 deletions

View File

@@ -1328,7 +1328,9 @@ const MCExpr *TargetLoweringObjectFileWasm::lowerRelativeReference(
MCSymbolRefExpr::create(TM.getSymbol(RHS), getContext()), getContext());
}
void
TargetLoweringObjectFileWasm::InitializeWasm() {
// TODO: Initialize StaticCtorSection and StaticDtorSection.
void TargetLoweringObjectFileWasm::InitializeWasm() {
StaticCtorSection =
getContext().getWasmSection(".init_array", wasm::WASM_SEC_DATA);
StaticDtorSection =
getContext().getWasmSection(".fini_array", wasm::WASM_SEC_DATA);
}