+ implemented R_WASM_MEMORY_ADDR_I32 relocations in the wasm internal linker

This commit is contained in:
Nikolay Nikolov 2024-01-01 16:13:11 +02:00
parent 12d7d271d6
commit 1b2d29ea1a

View File

@ -4235,6 +4235,22 @@ implementation
objsec.Data.seek(objreloc.DataOffset);
WriteUleb5(objsec.Data,objsym.LinkingData.ExeFunctionIndex);
end;
RELOC_ABSOLUTE:
begin
case objsym.typ of
AT_FUNCTION:
begin
Writeln('TODO: function table index');
end;
AT_DATA:
begin
objsec.Data.seek(objreloc.DataOffset);
objsec.writeUInt32LE(UInt32((objsym.offset+objsym.objsection.MemPos)+objreloc.Addend));
end;
else
internalerror(2024010108);
end;
end;
else
Writeln('Symbol relocation not yet implemented! ', objreloc.typ);
end;