+ 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:
nickysn 2019-08-02 16:05:37 +00:00
parent 8e436e6335
commit 3ebcef32ba
2 changed files with 9 additions and 1 deletions

View File

@ -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
****************************************************************************}

View File

@ -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;