Browse Source

* wasm internal linker: set mempos of the .wasm_tags (and .wasm_globals) section to 0

Nikolay Nikolov 1 year ago
parent
commit
033a2ae2e7
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/ogwasm.pas

+ 2 - 1
compiler/ogwasm.pas

@@ -5041,7 +5041,8 @@ implementation
             { calculate size of the section }
             { calculate size of the section }
             exesec.Size:=CurrMemPos-exesec.MemPos;
             exesec.Size:=CurrMemPos-exesec.MemPos;
           end
           end
-        else if Copy(aname,1,Length(DebugPrefix))=DebugPrefix then
+        else if (aname='.wasm_globals') or (aname='.wasm_tags') or
+                (Copy(aname,1,Length(DebugPrefix))=DebugPrefix) then
           begin
           begin
             CurrMemPos:=0;
             CurrMemPos:=0;
             inherited;
             inherited;