mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 11:06:19 +02:00
* 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:
parent
7747e1f6c8
commit
e1d56a9944
@ -3777,12 +3777,15 @@ implementation
|
|||||||
InputError('WASM_SYM_UNDEFINED not set on a SYMTAB_FUNCTION symbol, that is an import');
|
InputError('WASM_SYM_UNDEFINED not set on a SYMTAB_FUNCTION symbol, that is an import');
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
if (SymFlags and WASM_SYM_EXPLICIT_NAME)=0 then
|
||||||
|
begin
|
||||||
with CodeSegments[SymIndex-FuncTypeImportsCount] do
|
with CodeSegments[SymIndex-FuncTypeImportsCount] do
|
||||||
begin
|
begin
|
||||||
SegName:='.text.n_'+SymName;
|
SegName:='.text.n_'+SymName;
|
||||||
SegIsExported:=FuncTypes[SymIndex].IsExported;
|
SegIsExported:=FuncTypes[SymIndex].IsExported;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ create segments }
|
{ create segments }
|
||||||
for i:=low(CodeSegments) to high(CodeSegments) do
|
for i:=low(CodeSegments) to high(CodeSegments) do
|
||||||
|
Loading…
Reference in New Issue
Block a user