Browse Source

+ implemented R_WASM_GLOBAL_INDEX_LEB relocations in the wasm internal linker

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

+ 7 - 0
compiler/ogwasm.pas

@@ -4403,6 +4403,13 @@ implementation
                           internalerror(2024010110);
                           internalerror(2024010110);
                       end;
                       end;
                     end;
                     end;
+                  RELOC_GLOBAL_INDEX_LEB:
+                    begin
+                      if objsym.typ<>AT_WASM_GLOBAL then
+                        internalerror(2024010111);
+                      objsec.Data.seek(objreloc.DataOffset);
+                      WriteUleb5(objsec.Data,UInt32(objsym.offset));
+                    end;
                   else
                   else
                     Writeln('Symbol relocation not yet implemented! ', objreloc.typ);
                     Writeln('Symbol relocation not yet implemented! ', objreloc.typ);
                 end;
                 end;