mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 20:39:34 +02:00
+ introduced TExeSection.MemPosStr - a virtual method for converting the
section's memory position to string for the linker map file. This can be overriden e.g. for segmented exe formats. git-svn-id: trunk@42564 -
This commit is contained in:
parent
8e436e6335
commit
3ebcef32ba
@ -523,6 +523,8 @@ interface
|
||||
constructor create(AList:TFPHashObjectList;const AName:string);virtual;
|
||||
destructor destroy;override;
|
||||
procedure AddObjSection(objsec:TObjSection;ignoreprops:boolean=false);virtual;
|
||||
{ string representation for the linker map file }
|
||||
function MemPosStr(AImageBase: qword): string;virtual;
|
||||
property ObjSectionList:TFPObjectList read FObjSectionList;
|
||||
property SecSymIdx:longint read FSecSymIdx write FSecSymIdx;
|
||||
end;
|
||||
@ -1772,6 +1774,12 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
function TExeSection.MemPosStr(AImageBase: qword): string;
|
||||
begin
|
||||
result:='0x'+HexStr(mempos+AImageBase,sizeof(pint)*2);
|
||||
end;
|
||||
|
||||
|
||||
{****************************************************************************
|
||||
TStaticLibrary
|
||||
****************************************************************************}
|
||||
|
@ -164,7 +164,7 @@ implementation
|
||||
procedure TExeMap.AddMemoryMapExeSection(p:texesection);
|
||||
begin
|
||||
{ .text 0x000018a8 0xd958 }
|
||||
Add(PadSpace(p.name,15)+PadSpace(' 0x'+HexStr(p.mempos+Fimagebase,sizeof(pint)*2),12)+
|
||||
Add(PadSpace(p.name,15)+PadSpace(' '+p.MemPosStr(Fimagebase),12)+
|
||||
' '+PadSpaceLeft(sizestr(p.size),9));
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user