Browse Source

* implementation of TInternalLinkerWasi.DefaultLinkScript. Create a script that reads all the object files.

Nikolay Nikolov 1 year ago
parent
commit
34445a912a
1 changed files with 8 additions and 1 deletions
  1. 8 1
      compiler/systems/t_wasi.pas

+ 8 - 1
compiler/systems/t_wasi.pas

@@ -289,8 +289,15 @@ end;
 { TInternalLinkerWasi }
 
 procedure TInternalLinkerWasi.DefaultLinkScript;
+var
+  s: TCmdStr;
 begin
-  {TODO}
+  while not ObjectFiles.Empty do
+  begin
+    s:=ObjectFiles.GetFirst;
+    if s<>'' then
+      LinkScript.Concat('READOBJECT ' + maybequoted(s));
+  end;
 end;
 
 function TInternalLinkerWasi.GetCodeSize(aExeOutput: TExeOutput): QWord;