mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 15:31:41 +02:00
+ added check for whether R_WASM_TABLE_INDEX_I32 relocations always point to a function symbol in the wasm internal object reader
This commit is contained in:
parent
9d8b801e4c
commit
93d38629aa
@ -4149,7 +4149,14 @@ implementation
|
||||
exit;
|
||||
end;
|
||||
if Assigned(SymbolTable[RelocIndex].ObjSym) then
|
||||
ObjSec.ObjRelocations.Add(TWasmObjRelocation.CreateSymbol(RelocOffset-BaseSectionOffset,SymbolTable[RelocIndex].ObjSym,RELOC_ABSOLUTE))
|
||||
begin
|
||||
if SymbolTable[RelocIndex].ObjSym.typ<>AT_FUNCTION then
|
||||
begin
|
||||
InputError('R_WASM_TABLE_INDEX_I32 relocation must point to a function symbol');
|
||||
exit;
|
||||
end;
|
||||
ObjSec.ObjRelocations.Add(TWasmObjRelocation.CreateSymbol(RelocOffset-BaseSectionOffset,SymbolTable[RelocIndex].ObjSym,RELOC_ABSOLUTE))
|
||||
end
|
||||
else
|
||||
Writeln('Warning! No object symbol created for ', SymbolTable[RelocIndex].SymName);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user