Browse Source

+ WASI internal linker: simplify linker script generation for the .text, .rodata, .data and .bss sections via the use of ScriptAddGenericSections

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

+ 1 - 15
compiler/systems/t_wasi.pas

@@ -302,21 +302,7 @@ begin
   LinkScript.Concat('  OBJSECTION .wasm_globals.*');
   LinkScript.Concat('ENDEXESECTION');
 
-  LinkScript.Concat('EXESECTION .text');
-  LinkScript.Concat('  OBJSECTION .text.*');
-  LinkScript.Concat('ENDEXESECTION');
-
-  LinkScript.Concat('EXESECTION .rodata');
-  LinkScript.Concat('  OBJSECTION .rodata.*');
-  LinkScript.Concat('ENDEXESECTION');
-  LinkScript.Concat('EXESECTION .data');
-  LinkScript.Concat('  OBJSECTION .data.*');
-  LinkScript.Concat('ENDEXESECTION');
-  LinkScript.Concat('EXESECTION .bss');
-  LinkScript.Concat('  OBJSECTION .bss*');
-  LinkScript.Concat('ENDEXESECTION');
-
-  ScriptAddGenericSections('.debug_frame,.debug_info,.debug_line,.debug_abbrev,.debug_aranges,.debug_ranges,.debug_str');
+  ScriptAddGenericSections('.text,.rodata,.data,.bss,.debug_frame,.debug_info,.debug_line,.debug_abbrev,.debug_aranges,.debug_ranges,.debug_str');
 end;
 
 function TInternalLinkerWasi.GetDataSize(aExeOutput: TExeOutput): QWord;