mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-24 06:09:14 +02:00
* autoswitch to writing 32-bit PUBDEF OMF records if there's a need to encode a
32-bit offset git-svn-id: trunk@39089 -
This commit is contained in:
parent
ca50b14e21
commit
a656d98657
@ -410,6 +410,8 @@ interface
|
|||||||
procedure DecodeFrom(RawRecord: TOmfRawRecord);override;
|
procedure DecodeFrom(RawRecord: TOmfRawRecord);override;
|
||||||
procedure EncodeTo(RawRecord: TOmfRawRecord);override;
|
procedure EncodeTo(RawRecord: TOmfRawRecord);override;
|
||||||
|
|
||||||
|
procedure MaybeGo32;
|
||||||
|
|
||||||
property Is32Bit: Boolean read FIs32Bit write FIs32Bit;
|
property Is32Bit: Boolean read FIs32Bit write FIs32Bit;
|
||||||
property BaseGroupIndex: Integer read FBaseGroupIndex write FBaseGroupIndex;
|
property BaseGroupIndex: Integer read FBaseGroupIndex write FBaseGroupIndex;
|
||||||
property BaseSegmentIndex: Integer read FBaseSegmentIndex write FBaseSegmentIndex;
|
property BaseSegmentIndex: Integer read FBaseSegmentIndex write FBaseSegmentIndex;
|
||||||
@ -1718,6 +1720,7 @@ implementation
|
|||||||
Len,LastIncludedIndex,NextOfs,I: Integer;
|
Len,LastIncludedIndex,NextOfs,I: Integer;
|
||||||
PubName: TOmfPublicNameElement;
|
PubName: TOmfPublicNameElement;
|
||||||
begin
|
begin
|
||||||
|
MaybeGo32;
|
||||||
if Is32Bit then
|
if Is32Bit then
|
||||||
RawRecord.RecordType:=RT_PUBDEF32
|
RawRecord.RecordType:=RT_PUBDEF32
|
||||||
else
|
else
|
||||||
@ -1770,6 +1773,22 @@ implementation
|
|||||||
NextIndex:=LastIncludedIndex+1;
|
NextIndex:=LastIncludedIndex+1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TOmfRecord_PUBDEF.MaybeGo32;
|
||||||
|
var
|
||||||
|
I: Integer;
|
||||||
|
PubName: TOmfPublicNameElement;
|
||||||
|
begin
|
||||||
|
for I:=0 to PublicNames.Count-1 do
|
||||||
|
begin
|
||||||
|
PubName:=TOmfPublicNameElement(PublicNames[I]);
|
||||||
|
if PubName.PublicOffset>$ffff then
|
||||||
|
begin
|
||||||
|
Is32Bit:=true;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TOmfExternalNameElement }
|
{ TOmfExternalNameElement }
|
||||||
|
|
||||||
function TOmfExternalNameElement.GetLengthInFile: Integer;
|
function TOmfExternalNameElement.GetLengthInFile: Integer;
|
||||||
|
Loading…
Reference in New Issue
Block a user