mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-30 20:39:16 +02:00
+ read the section content in the wasm object reader
This commit is contained in:
parent
56fe6cadc8
commit
23fa8c80b6
@ -3016,6 +3016,7 @@ implementation
|
||||
ModuleMagic: array [0..3] of Byte;
|
||||
ModuleVersion: array [0..3] of Byte;
|
||||
i: Integer;
|
||||
CurrSec: TObjSection;
|
||||
begin
|
||||
FReader:=AReader;
|
||||
InputFileName:=AReader.FileName;
|
||||
@ -3034,6 +3035,18 @@ implementation
|
||||
while AReader.Pos<AReader.size do
|
||||
if not ReadSection then
|
||||
exit;
|
||||
|
||||
for i:=low(DataSegments) to high(DataSegments) do
|
||||
with DataSegments[i] do
|
||||
if Active then
|
||||
begin
|
||||
CurrSec:=ObjData.createsection(SegName,1 shl SegAlignment,[oso_Data,oso_load,oso_write],false);
|
||||
CurrSec.DataPos:=DataPos;
|
||||
CurrSec.MemPos:=Offset;
|
||||
CurrSec.Size:=Len;
|
||||
end;
|
||||
ReadSectionContent(ObjData);
|
||||
|
||||
Result:=True;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user