소스 검색

+ WASI internal linker: implemented GetCodeSize, GetDataSize and GetBssSize.

Nikolay Nikolov 1 년 전
부모
커밋
1e89579766
1개의 변경된 파일2개의 추가작업 그리고 16개의 파일을 삭제
  1. 2 16
      compiler/systems/t_wasi.pas

+ 2 - 16
compiler/systems/t_wasi.pas

@@ -78,9 +78,7 @@ type
   protected
     procedure DefaultLinkScript;override;
 
-    function GetCodeSize(aExeOutput: TExeOutput): QWord;override;
     function GetDataSize(aExeOutput: TExeOutput): QWord;override;
-    function GetBssSize(aExeOutput: TExeOutput): QWord;override;
   public
     constructor create;override;
 
@@ -315,22 +313,10 @@ begin
 
 end;
 
-function TInternalLinkerWasi.GetCodeSize(aExeOutput: TExeOutput): QWord;
-begin
-  {TODO}
-  Result:=0;
-end;
-
 function TInternalLinkerWasi.GetDataSize(aExeOutput: TExeOutput): QWord;
 begin
-  {TODO}
-  Result:=0;
-end;
-
-function TInternalLinkerWasi.GetBssSize(aExeOutput: TExeOutput): QWord;
-begin
-  {TODO}
-  Result:=0;
+  Result:=aExeOutput.findexesection('.rodata').size +
+          aExeOutput.findexesection('.data').size;
 end;
 
 constructor TInternalLinkerWasi.create;