Browse Source

+ debug print the obj symbols to the console

Nikolay Nikolov 3 years ago
parent
commit
455f603c8c
1 changed files with 8 additions and 0 deletions
  1. 8 0
      compiler/ogwasm.pas

+ 8 - 0
compiler/ogwasm.pas

@@ -360,6 +360,7 @@ implementation
         segment_count: Integer = 0;
         cur_seg_ofs: qword = 0;
         imports_count: Integer;
+        objsym: TObjSymbol;
       begin
         for i:=0 to Data.ObjSectionList.Count-1 do
           begin
@@ -422,6 +423,13 @@ implementation
         WriteWasmSection(wsiDataCount);
         WriteWasmSection(wsiData);
 
+        Writeln('ObjSymbolList:');
+        for i:=0 to Data.ObjSymbolList.Count-1 do
+          begin
+            objsym:=TObjSymbol(Data.ObjSymbolList[i]);
+            Writeln(objsym.Name, ' bind=', objsym.Bind);
+          end;
+
         Writeln('ObjSectionList:');
         for i:=0 to Data.ObjSectionList.Count-1 do
           begin