Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding Delphi MAP File

Tags:

delphi

Here is the sample of MAP file from my test project...

.......
 .......
 .......
 0001:001EFC14 00000020 C=CODE     S=.text    G=(none)   M=Vcl.CategoryButtons ACBP=A9
 0001:001EFC34 0000284C C=CODE     S=.text    G=(none)   M=Vcl.SysStyles ACBP=A9
 0001:001F2480 000407A8 C=CODE     S=.text    G=(none)   M=Vcl.Styles ACBP=A9
 0001:00232C28 00006998 C=CODE     S=.text    G=(none)   M=MainU ACBP=A9
 0002:00000000 000000B4 C=ICODE    S=.itext   G=(none)   M=System   ACBP=A9
 0002:000000B4 00000008 C=ICODE    S=.itext   G=(none)   M=SysInit  ACBP=A9
 ..... 
 .....

My Unit (MainU) resides from 00232C28 to 00006998. Upto here, the memory address prefix with 0001. Starting from the next unit, it begins 0002 and so on.

What does it mean?

As well, what is 'C=', 'S=' 'G=' 'M=' and 'ACBP = '?

like image 578
Saravana Santhosh Avatar asked Aug 09 '14 07:08

Saravana Santhosh


People also ask

What is a map file in Delphi?

Map files are plain text files that contain information about the global symbols of your program, source file, and source line numbers useful for debugging.

What is map data file?

sdata/sdata2 section is used for "small data" addressing.

What is map file in assembly?

The list file normally contains the assembly language code the compiler generated. It may also contain you original source code interspersed with the asm code. The map file contains all the static symbols (functions, globals, etc.) in your code and their relative addresses.

What is map file C?

A mapfile is a text file that contains the following information about the program being linked: The module name, which is the base name of the file. The timestamp from the program file header (not from the file system)


1 Answers

The format is:
SegmentId:StartAddress Length C=SegmentClass S=SegmentName G=SegmentGroup M=ModuleName

The ACBP has something to do with alignment but I can't tell you what the hex numbers mean.

C=CODE: Code-Segment
C=ICODE: Initialization Code-Segment
C=DATA: (initialized) Data-Segment
C=BSS: (uninitialized) Data-Segment
C=TLS: Thread Local Storage

G=(none): No Segment-Group

like image 125
Andreas Hausladen Avatar answered Sep 21 '22 09:09

Andreas Hausladen