Browse Source

+ write the import function indexes in the linker map file

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

+ 2 - 2
compiler/ogwasm.pas

@@ -4216,10 +4216,10 @@ implementation
 
       function AddFunctionImport(const libname,symname:TCmdStr; functype: TWasmFuncType): Integer;
         begin
-          if assigned(exemap) then
-            exemap.Add('  Importing Function ' + symname + functype.ToString);
           SetLength(FFunctionImports,Length(FFunctionImports)+1);
           Result:=High(FFunctionImports);
+          if assigned(exemap) then
+            exemap.Add('  Importing Function[' + tostr(Result) + '] ' + symname + functype.ToString);
           with FFunctionImports[Result] do
             begin
               ModName:=libname;