mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 02:07:53 +02:00
+ implemented R_WASM_MEMORY_ADDR_SLEB and R_WASM_TABLE_INDEX_SLEB relocations in the wasm internal linker
This commit is contained in:
parent
b440f57739
commit
4208fc79c7
@ -4314,6 +4314,27 @@ implementation
|
||||
objsec.Data.seek(objreloc.DataOffset);
|
||||
WriteUleb5(objsec.Data,UInt32((objsym.offset+objsym.objsection.MemPos)+objreloc.Addend));
|
||||
end;
|
||||
RELOC_MEMORY_ADDR_OR_TABLE_INDEX_SLEB:
|
||||
begin
|
||||
case objsym.typ of
|
||||
AT_FUNCTION:
|
||||
begin
|
||||
if objsym.LinkingData.ExeFunctionIndex=-1 then
|
||||
internalerror(2024010103);
|
||||
if objsym.LinkingData.ExeIndirectFunctionTableIndex=-1 then
|
||||
objsym.LinkingData.ExeIndirectFunctionTableIndex:=AddOrGetIndirectFunctionTableIndex(objsym.LinkingData.ExeFunctionIndex);
|
||||
objsec.Data.seek(objreloc.DataOffset);
|
||||
WriteSleb5(objsec.Data,Int32(objsym.LinkingData.ExeIndirectFunctionTableIndex));
|
||||
end;
|
||||
AT_DATA:
|
||||
begin
|
||||
objsec.Data.seek(objreloc.DataOffset);
|
||||
WriteSleb5(objsec.Data,Int32((objsym.offset+objsym.objsection.MemPos)+objreloc.Addend));
|
||||
end;
|
||||
else
|
||||
internalerror(2024010110);
|
||||
end;
|
||||
end;
|
||||
else
|
||||
Writeln('Symbol relocation not yet implemented! ', objreloc.typ);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user