Browse Source

+ wasm internal linker: implemented RELOC_TAG_INDEX_LEB relocations

Nikolay Nikolov 1 year ago
parent
commit
cd72a8910e
1 changed files with 7 additions and 0 deletions
  1. 7 0
      compiler/ogwasm.pas

+ 7 - 0
compiler/ogwasm.pas

@@ -4956,6 +4956,13 @@ implementation
                       objsec.Data.seek(objreloc.DataOffset);
                       WriteUleb5(objsec.Data,UInt32(objsym.offset+objsym.objsection.MemPos));
                     end;
+                  RELOC_TAG_INDEX_LEB:
+                    begin
+                      if objsym.typ<>AT_WASM_EXCEPTION_TAG then
+                        internalerror(2024010708);
+                      objsec.Data.seek(objreloc.DataOffset);
+                      WriteUleb5(objsec.Data,UInt32(objsym.offset+objsym.objsection.MemPos));
+                    end;
                   else
                     Writeln('Symbol relocation not yet implemented! ', objreloc.typ);
                 end;