|
@@ -254,6 +254,7 @@ interface
|
|
|
procedure GenerateLibraryImports(ImportLibraryList:TFPHashObjectList);override;
|
|
|
procedure AfterUnusedSectionRemoval;override;
|
|
|
procedure MemPos_ExeSection(const aname:string);override;
|
|
|
+ procedure Load_Start;override;
|
|
|
end;
|
|
|
|
|
|
{ TWasmAssembler }
|
|
@@ -4467,6 +4468,15 @@ implementation
|
|
|
inherited MemPos_ExeSection(aname);
|
|
|
end;
|
|
|
|
|
|
+ procedure TWasmExeOutput.Load_Start;
|
|
|
+ const
|
|
|
+ aname='__stack_pointer';
|
|
|
+ begin
|
|
|
+ inherited Load_Start;
|
|
|
+ internalObjData.createsection('*'+aname,0,[]);
|
|
|
+ internalObjData.SymbolDefine(aname,AB_GLOBAL,AT_WASM_GLOBAL);
|
|
|
+ end;
|
|
|
+
|
|
|
procedure TWasmExeOutput.PrepareImports;
|
|
|
|
|
|
function AddFunctionImport(const libname,symname:TCmdStr; functype: TWasmFuncType): Integer;
|