Pārlūkot izejas kodu

+ support writing R_WASM_MEMORY_ADDR_I32 relocations

Nikolay Nikolov 3 gadi atpakaļ
vecāks
revīzija
ea401ccc82
1 mainītis faili ar 7 papildinājumiem un 1 dzēšanām
  1. 7 1
      compiler/ogwasm.pas

+ 7 - 1
compiler/ogwasm.pas

@@ -1015,7 +1015,13 @@ implementation
                           WriteUleb(relout,TWasmObjSymbol(objrel.symbol).SymbolIndex);
                           WriteUleb(relout,TWasmObjSymbol(objrel.symbol).SymbolIndex);
                         end
                         end
                       else
                       else
-                        internalerror(2021092609);
+                        begin
+                          Inc(relcount^);
+                          WriteByte(relout,Ord(R_WASM_MEMORY_ADDR_I32));
+                          WriteUleb(relout,objrel.DataOffset+objsec.FileSectionOfs);
+                          WriteUleb(relout,TWasmObjSymbol(objrel.symbol).SymbolIndex);
+                          WriteUleb(relout,0);  { addend to add to the address }
+                        end;
                     end;
                     end;
                   RELOC_TYPE_INDEX_LEB:
                   RELOC_TYPE_INDEX_LEB:
                     begin
                     begin