mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 05:00:43 +02:00
* wasm internal linker: skip the element section when reading object files. This fixes linking with object modules, produced by the external assembler.
This commit is contained in:
parent
6a9376cb9e
commit
7f3ed9e85c
@ -2366,6 +2366,7 @@ implementation
|
|||||||
FunctionSectionRead: Boolean = false;
|
FunctionSectionRead: Boolean = false;
|
||||||
GlobalSectionRead: Boolean = false;
|
GlobalSectionRead: Boolean = false;
|
||||||
ExportSectionRead: Boolean = false;
|
ExportSectionRead: Boolean = false;
|
||||||
|
ElementSectionRead: Boolean = false;
|
||||||
CodeSectionRead: Boolean = false;
|
CodeSectionRead: Boolean = false;
|
||||||
DataSectionRead: Boolean = false;
|
DataSectionRead: Boolean = false;
|
||||||
DataCountSectionRead: Boolean = false;
|
DataCountSectionRead: Boolean = false;
|
||||||
@ -3646,6 +3647,20 @@ implementation
|
|||||||
Result:=True;
|
Result:=True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function ReadElementSection: Boolean;
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
if ElementSectionRead then
|
||||||
|
begin
|
||||||
|
InputError('Element section is duplicated');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
ElementSectionRead:=True;
|
||||||
|
{ We skip the element section for now }
|
||||||
|
{ TODO: implement reading it (and linking of tables) }
|
||||||
|
Result:=True;
|
||||||
|
end;
|
||||||
|
|
||||||
function ReadCodeSection: Boolean;
|
function ReadCodeSection: Boolean;
|
||||||
var
|
var
|
||||||
CodeEntriesCount: uint32;
|
CodeEntriesCount: uint32;
|
||||||
@ -3910,6 +3925,12 @@ implementation
|
|||||||
InputError('Error reading the export section');
|
InputError('Error reading the export section');
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
Byte(wsiElement):
|
||||||
|
if not ReadElementSection then
|
||||||
|
begin
|
||||||
|
InputError('Error reading the element section');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
Byte(wsiCode):
|
Byte(wsiCode):
|
||||||
if not ReadCodeSection then
|
if not ReadCodeSection then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user