Explorar el Código

* wasm internal linker: perform R_WASM_SECTION_OFFSET_I32 relocations

Nikolay Nikolov hace 1 año
padre
commit
baee5b9fd4
Se han modificado 1 ficheros con 7 adiciones y 0 borrados
  1. 7 0
      compiler/ogwasm.pas

+ 7 - 0
compiler/ogwasm.pas

@@ -4727,6 +4727,13 @@ implementation
                     Writeln('Symbol relocation not yet implemented! ', objreloc.typ);
                 end;
               end
+            else if assigned(objreloc.objsection) then
+              begin
+                if objreloc.typ<>RELOC_ABSOLUTE then
+                  internalerror(2024010601);
+                objsec.Data.seek(objreloc.DataOffset);
+                writeUInt32LE(UInt32((objreloc.objsection.MemPos)+objreloc.Addend));
+              end
             else if objreloc.typ=RELOC_TYPE_INDEX_LEB then
               begin
                 objreloc.ExeTypeIndex:=FFuncTypes.AddOrGetFuncType(objreloc.FuncType);