diff options
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 0149c82..f1fbc7f 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -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); } |