The information in this article applies to:
SUMMARY
When the Microsoft LINK command line includes the /MAP option, the
<mapfile> field specifies the name for the map file. The default map file
name is the base name of the executable file with the extension .MAP. To
suppress creating a map file, set the map filename to NUL.
MORE INFORMATION
In applications developed for MS-DOS or OS/2 in real mode, the Start and
Stop addresses are 20-bit hexadecimal addresses relative to the
application's load image. In applications developed for Microsoft Windows
or OS/2 in protected mode, the Start and Stop addresses are 32-bit
addresses in segment:offset notation. In OS/2, the segment value represents
a selector in the descriptor table that contains information about the
segments.
Q48241 Relationship Between Map File and Physical MemoryIf an MS-DOS program contains overlays, the map file divides the logical segment information into sections. The first section is labeled the "Resident" portion of the program, and each subsequent overlay has its own section labeled "Overlay 1h," "Overlay 2h," and so on. In addition, each public symbol is assigned one of the following attributes: RES -- The symbol resides in the resident portionIn applications developed for Windows or OS/2 protected mode, public symbols might have one of the following attributes: EXP -- If the symbol was exportedThe program entry point is the location where the operating system begins executing the program. The reported address is an offset from the lowest memory address at which program code is loaded. The application loader places this address into CS:IP when the application begins execution. Applications developed with Microsoft language products require specific initialization code; the entry point for each program is the symbol __astart. In an application developed for MS-DOS, the start segment is the base address of the program segment prefix (PSP) plus the size of the PSP (100h bytes). The loader places this value into the DS and ES registers when the application begins execution. To retrieve this segment address in C, declare the following variable:
The absolute starting address is the program entry point, plus the base
address of the PSP, plus the size of the PSP. In addition, to determine the
absolute address of any symbol, add its relative address given in the map
file to the base address of the PSP plus the size of the PSP.
In a protected-mode environment, there is no reliable method to determine the address of a symbol because segments may move in memory or be discarded. Additional query words: kbinf 5.01.20 5.01.21 5.02 5.03 5.05 5.10 5.11 5.13 5.15 5.20 5.30 5.31.009 5.50 no32bit
Keywords : kb16bitonly LinkIss |
Last Reviewed: October 21, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |