mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 20:19:33 +02:00
+ added virtual method to tobjsection for returning a string representation of
the section's base address for the internal linker map file * implemented it for omf sections to return the address in 'seg:ofs' format git-svn-id: trunk@31359 -
This commit is contained in:
parent
dbd3b0284d
commit
9aeb94676c
@ -265,6 +265,8 @@ interface
|
|||||||
procedure addrawReloc(ofs:aword;p:TObjSymbol;RawReloctype:byte);
|
procedure addrawReloc(ofs:aword;p:TObjSymbol;RawReloctype:byte);
|
||||||
procedure ReleaseData;
|
procedure ReleaseData;
|
||||||
function FullName:string;
|
function FullName:string;
|
||||||
|
{ string representation for the linker map file }
|
||||||
|
function MemPosStr(AImageBase: qword): string;virtual;
|
||||||
property Data:TDynamicArray read FData;
|
property Data:TDynamicArray read FData;
|
||||||
property SecOptions:TObjSectionOptions read FSecOptions write SetSecOptions;
|
property SecOptions:TObjSectionOptions read FSecOptions write SetSecOptions;
|
||||||
end;
|
end;
|
||||||
@ -1002,6 +1004,12 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function TObjSection.MemPosStr(AImageBase: qword): string;
|
||||||
|
begin
|
||||||
|
result:='0x'+HexStr(mempos+AImageBase,sizeof(pint)*2);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
TObjData
|
TObjData
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
@ -182,7 +182,7 @@ implementation
|
|||||||
Add(' '+secname);
|
Add(' '+secname);
|
||||||
secname:='';
|
secname:='';
|
||||||
end;
|
end;
|
||||||
Add(' '+PadSpace(secname,14)+PadSpace(' 0x'+HexStr(p.mempos+FImageBase,sizeof(pint)*2),12)+
|
Add(' '+PadSpace(secname,14)+PadSpace(' '+p.MemPosStr(FImageBase),12)+
|
||||||
' '+PadSpaceLeft(sizestr(p.size),9)+' '+p.objdata.name);
|
' '+PadSpaceLeft(sizestr(p.size),9)+' '+p.objdata.name);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -68,6 +68,7 @@ interface
|
|||||||
function GetOmfAlignment: TOmfSegmentAlignment;
|
function GetOmfAlignment: TOmfSegmentAlignment;
|
||||||
public
|
public
|
||||||
constructor create(AList:TFPHashObjectList;const Aname:string;Aalign:shortint;Aoptions:TObjSectionOptions);override;
|
constructor create(AList:TFPHashObjectList;const Aname:string;Aalign:shortint;Aoptions:TObjSectionOptions);override;
|
||||||
|
function MemPosStr(AImageBase: qword): string;override;
|
||||||
property ClassName: string read FClassName;
|
property ClassName: string read FClassName;
|
||||||
property OverlayName: string read FOverlayName;
|
property OverlayName: string read FOverlayName;
|
||||||
property OmfAlignment: TOmfSegmentAlignment read GetOmfAlignment;
|
property OmfAlignment: TOmfSegmentAlignment read GetOmfAlignment;
|
||||||
@ -419,6 +420,11 @@ implementation
|
|||||||
FPrimaryGroup:='';
|
FPrimaryGroup:='';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TOmfObjSection.MemPosStr(AImageBase: qword): string;
|
||||||
|
begin
|
||||||
|
Result:=HexStr(MemPos shr 4,4)+':'+HexStr(MemPos and $000f,4);
|
||||||
|
end;
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
TOmfObjData
|
TOmfObjData
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
Loading…
Reference in New Issue
Block a user