mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-10 01:08:35 +02:00
+ support writing R_WASM_GLOBAL_INDEX_I32 relocations in the WebAssembly internal object writer
This commit is contained in:
parent
ee98fa8e3f
commit
9799c6a5ec
@ -1609,6 +1609,16 @@ implementation
|
||||
WriteUleb(relout,FuncSym.SymbolIndex);
|
||||
WriteSleb(relout,objrel.Addend+objrel.symbol.address); { addend to add to the address }
|
||||
end
|
||||
else if assigned(objrel.symbol) and (objrel.symbol.typ=AT_WASM_GLOBAL) then
|
||||
begin
|
||||
Inc(relcount^);
|
||||
WriteByte(relout,Ord(R_WASM_GLOBAL_INDEX_I32));
|
||||
WriteUleb(relout,objrel.DataOffset+objsec.FileSectionOfs);
|
||||
if (TWasmObjSymbol(objrel.symbol).SymbolIndex<0) then
|
||||
message1(asmw_e_illegal_unset_index,objrel.symbol.name)
|
||||
else
|
||||
WriteUleb(relout,TWasmObjSymbol(objrel.symbol).SymbolIndex);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Inc(relcount^);
|
||||
|
Loading…
Reference in New Issue
Block a user