mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 13:49:07 +02:00
* WebAssembly threads internal linker: starting working on TWasmExeOutput.SetThreadVarGlobalsInitValues
This commit is contained in:
parent
39ab212642
commit
334ef633a8
@ -279,6 +279,7 @@ interface
|
||||
procedure PrepareTags;
|
||||
function AddOrGetIndirectFunctionTableIndex(FuncIdx: Integer): integer;
|
||||
procedure SetStackPointer;
|
||||
procedure SetThreadVarGlobalsInitValues;
|
||||
procedure GenerateCode_InitTls;
|
||||
procedure WriteExeSectionToDynArray(exesec: TExeSection; dynarr: tdynamicarray);
|
||||
protected
|
||||
@ -4878,6 +4879,7 @@ implementation
|
||||
WriteName(FWasmCustomSections[cust_sec],WasmCustomSectionName[cust_sec]);
|
||||
|
||||
SetStackPointer;
|
||||
SetThreadVarGlobalsInitValues;
|
||||
GenerateCode_InitTls;
|
||||
|
||||
FFuncTypes.WriteTo(FWasmSections[wsiType]);
|
||||
@ -5425,6 +5427,24 @@ implementation
|
||||
FStackPointerSym.LinkingData.GlobalInitializer.init_i32:=Int32(InitialStackPtrAddr);
|
||||
end;
|
||||
|
||||
procedure TWasmExeOutput.SetThreadVarGlobalsInitValues;
|
||||
var
|
||||
exesec: TExeSection;
|
||||
i: Integer;
|
||||
objsec: TWasmObjSection;
|
||||
objsym: TWasmObjSymbol;
|
||||
begin
|
||||
exesec:=FindExeSection('.wasm_globals');
|
||||
if not assigned(exesec) then
|
||||
internalerror(2024010112);
|
||||
for i:=0 to exesec.ObjSectionList.Count-1 do
|
||||
begin
|
||||
objsec:=TWasmObjSection(exesec.ObjSectionList[i]);
|
||||
objsym:=objsec.MainFuncSymbol;
|
||||
{ TODO: implement }
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWasmExeOutput.GenerateCode_InitTls;
|
||||
var
|
||||
a: Byte=0;
|
||||
|
Loading…
Reference in New Issue
Block a user