+ wasm internal linker: count the 'fpc.reshandles' section towards the bss size

of the binary
This commit is contained in:
Nikolay Nikolov 2024-06-27 23:42:46 +03:00
parent 2828752587
commit 924d4b9b53

View File

@ -79,6 +79,7 @@ type
procedure DefaultLinkScript;override;
function GetDataSize(aExeOutput: TExeOutput): QWord;override;
function GetBssSize(aExeOutput: TExeOutput): QWord;override;
public
constructor create;override;
@ -313,6 +314,12 @@ begin
aExeOutput.findexesection('fpc.resources').size;
end;
function TInternalLinkerWasi.GetBssSize(aExeOutput: TExeOutput): QWord;
begin
Result:=aExeOutput.findexesection('.bss').size +
aExeOutput.findexesection('fpc.reshandles').size;
end;
constructor TInternalLinkerWasi.create;
begin
inherited create;