mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 21:28:03 +02:00
+ wasm internal obj reader: add globals to a '.wasm_globals' object section
This commit is contained in:
parent
2eae62a6e8
commit
ef796906e9
@ -3851,6 +3851,7 @@ implementation
|
||||
CurrSec.Size:=Len;
|
||||
end;
|
||||
ReadSectionContent(ObjData);
|
||||
ObjData.createsection('.wasm_globals',1,[]);
|
||||
|
||||
for i:=low(SymbolTable) to high(SymbolTable) do
|
||||
with SymbolTable[i] do
|
||||
@ -3966,9 +3967,7 @@ implementation
|
||||
objsym:=TWasmObjSymbol(ObjData.CreateSymbol(SymName));
|
||||
objsym.bind:=AB_GLOBAL;
|
||||
objsym.typ:=AT_WASM_GLOBAL;
|
||||
objsym.objsection:=nil;
|
||||
//if (SymFlags and WASM_SYM_EXPLICIT_NAME)=0 then
|
||||
// TWasmObjSection(ObjData.ObjSectionList[SymIndex-FuncTypeImportsCount]).MainFuncSymbol:=objsym;
|
||||
objsym.objsection:=ObjData.findsection('.wasm_globals');
|
||||
objsym.offset:=0;
|
||||
objsym.size:=0;
|
||||
end;
|
||||
|
@ -299,6 +299,7 @@ begin
|
||||
|
||||
LinkScript.Concat('EXESECTION .wasm_globals');
|
||||
LinkScript.Concat(' SYMBOL __stack_pointer');
|
||||
LinkScript.Concat(' OBJSECTION .wasm_globals');
|
||||
LinkScript.Concat('ENDEXESECTION');
|
||||
|
||||
LinkScript.Concat('EXESECTION .text');
|
||||
|
Loading…
Reference in New Issue
Block a user