From ba1c494cd6cd82c3a69618cc3506a6c83b438753 Mon Sep 17 00:00:00 2001 From: nickysn Date: Mon, 24 Aug 2015 22:12:00 +0000 Subject: [PATCH] * the code for displaying a symbol address in the linker map file moved to a method in TObjSymbol git-svn-id: trunk@31411 - --- compiler/ogbase.pas | 8 ++++++++ compiler/ogmap.pas | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/compiler/ogbase.pas b/compiler/ogbase.pas index feafdd576a..99cc3097fd 100644 --- a/compiler/ogbase.pas +++ b/compiler/ogbase.pas @@ -192,6 +192,8 @@ interface function address:aword; procedure SetAddress(apass:byte;aobjsec:TObjSection;abind:TAsmsymbind;atyp:Tasmsymtype); function ObjData: TObjData; + { string representation for the linker map file } + function AddressStr(AImageBase: qword): string; end; { Stabs is common for all targets } @@ -749,6 +751,12 @@ implementation result:=(OwnerList as TObjSymbolList).Owner; end; + + function TObjSymbol.AddressStr(AImageBase: qword): string; + begin + Result:='0x'+HexStr(address+Aimagebase,sizeof(pint)*2); + end; + {**************************************************************************** TObjRelocation ****************************************************************************} diff --git a/compiler/ogmap.pas b/compiler/ogmap.pas index 39452f3c54..8d75a90613 100644 --- a/compiler/ogmap.pas +++ b/compiler/ogmap.pas @@ -190,7 +190,7 @@ implementation procedure TExeMap.AddMemoryMapSymbol(p:TObjSymbol); begin { 0x00001e30 setup_screens } - Add(Space(16)+PadSpace('0x'+HexStr(p.address+Fimagebase,sizeof(pint)*2),25)+' '+p.name); + Add(Space(16)+PadSpace(p.AddressStr(FImageBase),25)+' '+p.name); end; end.