* wasm internal linker: perform R_WASM_SECTION_OFFSET_I32 relocations

This commit is contained in:
Nikolay Nikolov 2024-01-06 21:12:22 +02:00
parent 1061965ea5
commit baee5b9fd4

View File

@ -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);