Browse Source

+ create exe sections in the wasi internal linker script

Nikolay Nikolov 1 year ago
parent
commit
605740fd0a
1 changed files with 11 additions and 0 deletions
  1. 11 0
      compiler/systems/t_wasi.pas

+ 11 - 0
compiler/systems/t_wasi.pas

@@ -298,6 +298,17 @@ begin
     if s<>'' then
     if s<>'' then
       LinkScript.Concat('READOBJECT ' + maybequoted(s));
       LinkScript.Concat('READOBJECT ' + maybequoted(s));
   end;
   end;
+
+  LinkScript.Concat('EXESECTION .text');
+  LinkScript.Concat('  OBJSECTION .text.*');
+  LinkScript.Concat('ENDEXESECTION');
+
+  LinkScript.Concat('EXESECTION .data');
+  LinkScript.Concat('  OBJSECTION .rodata.*');
+  LinkScript.Concat('  OBJSECTION .data.*');
+  LinkScript.Concat('  OBJSECTION .bss');
+  LinkScript.Concat('ENDEXESECTION');
+
 end;
 end;
 
 
 function TInternalLinkerWasi.GetCodeSize(aExeOutput: TExeOutput): QWord;
 function TInternalLinkerWasi.GetCodeSize(aExeOutput: TExeOutput): QWord;