mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-05 08:50:19 +02:00
+ started parsing of custom sections - known custom sections are dispatched to
a specialized parsing function for each of them, while unknown custom sections (currently the ones, not produced by FPC) produce an error
This commit is contained in:
parent
2ae98a7363
commit
5a5abe2419
@ -2225,8 +2225,47 @@ implementation
|
||||
DataCount: uint32;
|
||||
|
||||
function ReadCustomSection: Boolean;
|
||||
|
||||
function ReadRelocationSection: Boolean;
|
||||
begin
|
||||
Result:=False;
|
||||
end;
|
||||
|
||||
function ReadLinkingSection: Boolean;
|
||||
begin
|
||||
Result:=False;
|
||||
end;
|
||||
|
||||
function ReadProducersSection: Boolean;
|
||||
begin
|
||||
Result:=False;
|
||||
end;
|
||||
|
||||
function ReadTargetFeaturesSection: Boolean;
|
||||
begin
|
||||
Result:=False;
|
||||
end;
|
||||
|
||||
const
|
||||
RelocationSectionPrefix = 'reloc.';
|
||||
var
|
||||
SectionName: ansistring;
|
||||
begin
|
||||
Result:=False;
|
||||
ReadName(SectionName);
|
||||
if Copy(SectionName,1,Length(RelocationSectionPrefix)) = RelocationSectionPrefix then
|
||||
Result:=ReadRelocationSection
|
||||
else
|
||||
case SectionName of
|
||||
'linking':
|
||||
Result:=ReadLinkingSection;
|
||||
'producers':
|
||||
Result:=ReadProducersSection;
|
||||
'target_features':
|
||||
Result:=ReadTargetFeaturesSection;
|
||||
else
|
||||
InputError('Unsupported custom section: ''' + SectionName + '''');
|
||||
end;
|
||||
end;
|
||||
|
||||
function ReadTypeSection: Boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user