瀏覽代碼

+ create exe sections in the wasi internal linker script

Nikolay Nikolov 1 年之前
父節點
當前提交
605740fd0a
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11 0
      compiler/systems/t_wasi.pas

+ 11 - 0
compiler/systems/t_wasi.pas

@@ -298,6 +298,17 @@ begin
     if s<>'' then
       LinkScript.Concat('READOBJECT ' + maybequoted(s));
   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;
 
 function TInternalLinkerWasi.GetCodeSize(aExeOutput: TExeOutput): QWord;