File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -452,7 +452,8 @@ asmTellGlobals ty_word = do
452
452
asmTellCtors :: WasmTypeTag w -> [SymName ] -> WasmAsmM ()
453
453
asmTellCtors _ [] = mempty
454
454
asmTellCtors ty_word syms = do
455
- asmTellSectionHeader " .init_array"
455
+ -- See Note [JSFFI initialization] for details
456
+ asmTellSectionHeader " .init_array.101"
456
457
asmTellAlign $ alignmentFromWordType ty_word
457
458
for_ syms $ \ sym ->
458
459
asmTellTabLine $
Original file line number Diff line number Diff line change @@ -1533,5 +1533,8 @@ pprCtorArray platform initOrFini lbls =
1533
1533
body = vcat [ pprCLabel platform lbl <> text " ();" | lbl <- lbls ]
1534
1534
decls = vcat [ text " void" <+> pprCLabel platform lbl <> text " (void);" | lbl <- lbls ]
1535
1535
attribute = case initOrFini of
1536
- IsInitArray -> text " constructor"
1536
+ IsInitArray
1537
+ -- See Note [JSFFI initialization] for details
1538
+ | ArchWasm32 <- platformArch platform -> text " constructor(101)"
1539
+ | otherwise -> text " constructor"
1537
1540
IsFiniArray -> text " destructor"
You can’t perform that action at this time.
0 commit comments