mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 20:39:34 +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 ReleaseData;
|
||||
function FullName:string;
|
||||
{ string representation for the linker map file }
|
||||
function MemPosStr(AImageBase: qword): string;virtual;
|
||||
property Data:TDynamicArray read FData;
|
||||
property SecOptions:TObjSectionOptions read FSecOptions write SetSecOptions;
|
||||
end;
|
||||
@ -1002,6 +1004,12 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
function TObjSection.MemPosStr(AImageBase: qword): string;
|
||||
begin
|
||||
result:='0x'+HexStr(mempos+AImageBase,sizeof(pint)*2);
|
||||
end;
|
||||
|
||||
|
||||
{****************************************************************************
|
||||
TObjData
|
||||
****************************************************************************}
|
||||
|
@ -182,7 +182,7 @@ implementation
|
||||
Add(' '+secname);
|
||||
secname:='';
|
||||
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);
|
||||
end;
|
||||
|
||||
|
@ -68,6 +68,7 @@ interface
|
||||
function GetOmfAlignment: TOmfSegmentAlignment;
|
||||
public
|
||||
constructor create(AList:TFPHashObjectList;const Aname:string;Aalign:shortint;Aoptions:TObjSectionOptions);override;
|
||||
function MemPosStr(AImageBase: qword): string;override;
|
||||
property ClassName: string read FClassName;
|
||||
property OverlayName: string read FOverlayName;
|
||||
property OmfAlignment: TOmfSegmentAlignment read GetOmfAlignment;
|
||||
@ -419,6 +420,11 @@ implementation
|
||||
FPrimaryGroup:='';
|
||||
end;
|
||||
|
||||
function TOmfObjSection.MemPosStr(AImageBase: qword): string;
|
||||
begin
|
||||
Result:=HexStr(MemPos shr 4,4)+':'+HexStr(MemPos and $000f,4);
|
||||
end;
|
||||
|
||||
{****************************************************************************
|
||||
TOmfObjData
|
||||
****************************************************************************}
|
||||
|
Loading…
Reference in New Issue
Block a user