* wasm internal linker: use the main symbol (without WASM_SYM_EXPLICIT_NAME,

i.e. not an alias) to define code section names in the wasm object reader.
  For example, the section for the INITHEAP function is now called:
    .text.n_SYSTEM_$$_INITHEAP
  instead of
    .text.n__FPC_InitHeap
  (which is based on an explicit alias for the function - '_FPC_InitHeap')
This commit is contained in:
Nikolay Nikolov 2024-01-01 13:35:23 +02:00
parent 7747e1f6c8
commit e1d56a9944

View File

@ -3777,10 +3777,13 @@ implementation
InputError('WASM_SYM_UNDEFINED not set on a SYMTAB_FUNCTION symbol, that is an import');
exit;
end;
with CodeSegments[SymIndex-FuncTypeImportsCount] do
if (SymFlags and WASM_SYM_EXPLICIT_NAME)=0 then
begin
SegName:='.text.n_'+SymName;
SegIsExported:=FuncTypes[SymIndex].IsExported;
with CodeSegments[SymIndex-FuncTypeImportsCount] do
begin
SegName:='.text.n_'+SymName;
SegIsExported:=FuncTypes[SymIndex].IsExported;
end;
end;
end;