Browse Source

+ support local binding when reading data symbols in the internal wasm object reader

Nikolay Nikolov 1 year ago
parent
commit
ced7e40c43
1 changed files with 4 additions and 1 deletions
  1. 4 1
      compiler/ogwasm.pas

+ 4 - 1
compiler/ogwasm.pas

@@ -3194,7 +3194,10 @@ implementation
                 else
                   begin
                     objsym:=ObjData.CreateSymbol(SymName);
-                    objsym.bind:=AB_GLOBAL;
+                    if (SymFlags and WASM_SYM_BINDING_LOCAL)<> 0 then
+                      objsym.bind:=AB_LOCAL
+                    else
+                      objsym.bind:=AB_GLOBAL;
                     objsym.typ:=AT_DATA;
                     objsym.objsection:=TObjSection(ObjData.ObjSectionList[SymIndex]);
                     objsym.offset:=SymOffset;