mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 10:19:30 +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 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;
|
||||
|
Loading…
Reference in New Issue
Block a user