mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 22:14:25 +02:00
+ added read only property TOmfSubRecord_FIXUP.LocationSize, which returns the
size in bytes of the fixup git-svn-id: trunk@30678 -
This commit is contained in:
parent
62239ba890
commit
32e0eca0dc
@ -441,6 +441,7 @@ interface
|
|||||||
FFrameMethod: TOmfFixupFrameMethod;
|
FFrameMethod: TOmfFixupFrameMethod;
|
||||||
FFrameDatum: Integer;
|
FFrameDatum: Integer;
|
||||||
function GetDataRecordOffset: Integer;
|
function GetDataRecordOffset: Integer;
|
||||||
|
function GetLocationSize: Integer;
|
||||||
procedure SetDataRecordOffset(AValue: Integer);
|
procedure SetDataRecordOffset(AValue: Integer);
|
||||||
public
|
public
|
||||||
function ReadAt(RawRecord: TOmfRawRecord; Offset: Integer): Integer;
|
function ReadAt(RawRecord: TOmfRawRecord; Offset: Integer): Integer;
|
||||||
@ -450,6 +451,7 @@ interface
|
|||||||
property Mode: TOmfFixupMode read FMode write FMode;
|
property Mode: TOmfFixupMode read FMode write FMode;
|
||||||
property LocationType: TOmfFixupLocationType read FLocationType write FLocationType;
|
property LocationType: TOmfFixupLocationType read FLocationType write FLocationType;
|
||||||
property LocationOffset: DWord read FLocationOffset write FLocationOffset;
|
property LocationOffset: DWord read FLocationOffset write FLocationOffset;
|
||||||
|
property LocationSize: Integer read GetLocationSize;
|
||||||
property DataRecordStartOffset: DWord read FDataRecordStartOffset write FDataRecordStartOffset;
|
property DataRecordStartOffset: DWord read FDataRecordStartOffset write FDataRecordStartOffset;
|
||||||
property DataRecordOffset: Integer read GetDataRecordOffset write SetDataRecordOffset;
|
property DataRecordOffset: Integer read GetDataRecordOffset write SetDataRecordOffset;
|
||||||
property TargetDeterminedByThread: Boolean read FTargetDeterminedByThread write FTargetDeterminedByThread;
|
property TargetDeterminedByThread: Boolean read FTargetDeterminedByThread write FTargetDeterminedByThread;
|
||||||
@ -1321,6 +1323,29 @@ implementation
|
|||||||
Result:=FLocationOffset-FDataRecordStartOffset;
|
Result:=FLocationOffset-FDataRecordStartOffset;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TOmfSubRecord_FIXUP.GetLocationSize: Integer;
|
||||||
|
const
|
||||||
|
OmfLocationType2Size: array [TOmfFixupLocationType] of Integer=
|
||||||
|
(1, // fltLoByte
|
||||||
|
2, // fltOffset
|
||||||
|
2, // fltBase
|
||||||
|
4, // fltFarPointer
|
||||||
|
1, // fltHiByte
|
||||||
|
2, // fltLoaderResolvedOffset (PharLap: Offset32)
|
||||||
|
0, // fltUndefined6 (PharLap: Pointer48)
|
||||||
|
0, // fltUndefined7
|
||||||
|
0, // fltUndefined8
|
||||||
|
4, // fltOffset32
|
||||||
|
0, // fltUndefined10
|
||||||
|
6, // fltFarPointer48
|
||||||
|
0, // fltUndefined12
|
||||||
|
4, // fltLoaderResolvedOffset32
|
||||||
|
0, // fltUndefined14
|
||||||
|
0); // fltUndefined15
|
||||||
|
begin
|
||||||
|
Result:=OmfLocationType2Size[LocationType];
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TOmfSubRecord_FIXUP.SetDataRecordOffset(AValue: Integer);
|
procedure TOmfSubRecord_FIXUP.SetDataRecordOffset(AValue: Integer);
|
||||||
begin
|
begin
|
||||||
FLocationOffset:=AValue+FDataRecordStartOffset;
|
FLocationOffset:=AValue+FDataRecordStartOffset;
|
||||||
|
Loading…
Reference in New Issue
Block a user