mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 05:09:19 +02:00
+ wasm internal linker: internally define the '__stack_pointer' global symbol
This commit is contained in:
parent
880d0333b0
commit
408e388af3
@ -254,6 +254,7 @@ interface
|
|||||||
procedure GenerateLibraryImports(ImportLibraryList:TFPHashObjectList);override;
|
procedure GenerateLibraryImports(ImportLibraryList:TFPHashObjectList);override;
|
||||||
procedure AfterUnusedSectionRemoval;override;
|
procedure AfterUnusedSectionRemoval;override;
|
||||||
procedure MemPos_ExeSection(const aname:string);override;
|
procedure MemPos_ExeSection(const aname:string);override;
|
||||||
|
procedure Load_Start;override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TWasmAssembler }
|
{ TWasmAssembler }
|
||||||
@ -4467,6 +4468,15 @@ implementation
|
|||||||
inherited MemPos_ExeSection(aname);
|
inherited MemPos_ExeSection(aname);
|
||||||
end;
|
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;
|
procedure TWasmExeOutput.PrepareImports;
|
||||||
|
|
||||||
function AddFunctionImport(const libname,symname:TCmdStr; functype: TWasmFuncType): Integer;
|
function AddFunctionImport(const libname,symname:TCmdStr; functype: TWasmFuncType): Integer;
|
||||||
|
Loading…
Reference in New Issue
Block a user