Browse Source

+ auto add oso_data and oso_sparse_data when creating a .bss segment on the wasm target

Nikolay Nikolov 1 year ago
parent
commit
791328ccb5
1 changed files with 2 additions and 0 deletions
  1. 2 0
      compiler/ogbase.pas

+ 2 - 0
compiler/ogbase.pas

@@ -1469,6 +1469,8 @@ implementation
               end;
               end;
           end;
           end;
         result:=secoptions[atype];
         result:=secoptions[atype];
+        if (target_info.system in systems_wasm) and (atype=sec_bss) then
+          Result:=Result+[oso_data,oso_sparse_data];
 {$ifdef OMFOBJSUPPORT}
 {$ifdef OMFOBJSUPPORT}
         { in the huge memory model, BSS data is actually written in the regular
         { in the huge memory model, BSS data is actually written in the regular
           FAR_DATA segment of the module }
           FAR_DATA segment of the module }