mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 23:29:13 +02:00
* wasm32 obj writer: use Data.ObjSectionList.Find to find the debug section by name in MaybeWriteDebugSection
This commit is contained in:
parent
e959422753
commit
cc260eb7b2
@ -1401,13 +1401,10 @@ implementation
|
|||||||
|
|
||||||
procedure MaybeWriteDebugSection(const sn: string; st: TWasmCustomSectionType);
|
procedure MaybeWriteDebugSection(const sn: string; st: TWasmCustomSectionType);
|
||||||
var
|
var
|
||||||
i: Integer;
|
|
||||||
objsec: TWasmObjSection;
|
objsec: TWasmObjSection;
|
||||||
begin
|
begin
|
||||||
for i:=0 to Data.ObjSectionList.Count-1 do
|
objsec:=TWasmObjSection(Data.ObjSectionList.Find(sn));
|
||||||
begin
|
if Assigned(objsec) then
|
||||||
objsec:=TWasmObjSection(Data.ObjSectionList[i]);
|
|
||||||
if objsec.Name=sn then
|
|
||||||
begin
|
begin
|
||||||
if oso_Data in objsec.SecOptions then
|
if oso_Data in objsec.SecOptions then
|
||||||
begin
|
begin
|
||||||
@ -1419,7 +1416,6 @@ implementation
|
|||||||
WriteWasmCustomSection(st);
|
WriteWasmCustomSection(st);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
|
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
|
Loading…
Reference in New Issue
Block a user