Browse Source

+ wasm internal linker: count the 'fpc.resources' section towards the binary
data size

Nikolay Nikolov 1 year ago
parent
commit
2828752587
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/systems/t_wasi.pas

+ 2 - 1
compiler/systems/t_wasi.pas

@@ -309,7 +309,8 @@ end;
 function TInternalLinkerWasi.GetDataSize(aExeOutput: TExeOutput): QWord;
 function TInternalLinkerWasi.GetDataSize(aExeOutput: TExeOutput): QWord;
 begin
 begin
   Result:=aExeOutput.findexesection('.rodata').size +
   Result:=aExeOutput.findexesection('.rodata').size +
-          aExeOutput.findexesection('.data').size;
+          aExeOutput.findexesection('.data').size +
+          aExeOutput.findexesection('fpc.resources').size;
 end;
 end;
 
 
 constructor TInternalLinkerWasi.create;
 constructor TInternalLinkerWasi.create;