[WebAssembly] MC: Support for init_array and fini_array

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314783 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Sam Clegg
2017-10-03 11:20:28 +00:00
parent b863c40437
commit 7fa3570b3b
2 changed files with 101 additions and 3 deletions
+5 -3
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);
}