Keil Logo

Listing (MAP) File

The linker listing file or map file contains an abundance of information about the link/locate process and is composed of a number of sections, each of which is described below in the order in which they appear in the map file.

Page Header

Each listing page includes a header with the linker version number, date, time, and page number.

LX51 LINKER/LOCATER V3.62               02/29/2004  09:59:51  PAGE 1

Command Line

The entire command line that was used to invoke the linker is included in the map file. This often helps diagnose problems with the command line.

LX51 LINKER/LOCATER V3.62, INVOKED BY:

C:\Keil_v5\C51\BIN\LX51.EXE Measure.obj, Mcommand.obj, Getline.obj
>> TO Measure REGFILE (.\Measure.ORC) CLASSES (HDATA (X:0X
>> 0-X:0XFFFF), ECODE (C:0X0-C:0XFFFF), HCONST (C:0X0-C:0X
>> FFFF))

CPU Details

Details about the selected CPU, mode, and memory model are included. These indicate the default memory model libraries included in the linkage. If floating-point math is used, the floating-point libraries are included as well.

CPU MODE:     8051 MODE
MEMORY MODEL: SMALL WITH FLOATING POINT ARITHMETIC

Input Modules

The input modules section includes the names of all object modules and library files and modules that are included in the linkage. This is a good place to check if you have problems linking certain object files.

INPUT MODULES INCLUDED:
  Measure.obj (MEASURE)
         COMMENT TYPE 0: C51 V7.09
  Mcommand.obj (MCOMMAND)
         COMMENT TYPE 0: C51 V7.09
  Getline.obj (GETLINE)
         COMMENT TYPE 0: C51 V7.09
  C:\Keil_v5\C51\LIB\C51FPS.LIB (?C?FPADD)
         COMMENT TYPE 1: A51 / ASM51 Assembler
  C:\Keil_v5\C51\LIB\C51FPS.LIB (?C?FPMUL)
         COMMENT TYPE 1: A51 / ASM51 Assembler
  C:\Keil_v5\C51\LIB\C51FPS.LIB (?C?FPDIV)
         COMMENT TYPE 1: A51 / ASM51 Assembler
  C:\Keil_v5\C51\LIB\C51FPS.LIB (?C?FPCMP)
         COMMENT TYPE 1: A51 / ASM51 Assembler
.
.
.
  C:\Keil_v5\C51\LIB\C51FPS.LIB (PRINTF)
         COMMENT TYPE 1: A51 / ASM51 Assembler
  C:\Keil_v5\C51\LIB\C51FPS.LIB (SCANF)
         COMMENT TYPE 1: A51 / ASM51 Assembler
  C:\Keil_v5\C51\LIB\C51FPS.LIB (?C?FPGETOPN)
         COMMENT TYPE 1: A51 / ASM51 Assembler
  C:\Keil_v5\C51\LIB\C51FPS.LIB (?C?FPROUND)
         COMMENT TYPE 1: A51 / ASM51 Assembler
  C:\Keil_v5\C51\LIB\C51FPS.LIB (?C?FPCONVERT)
         COMMENT TYPE 1: A51 / ASM51 Assembler
  C:\Keil_v5\C51\LIB\C51FPS.LIB (?C?ATOF)
         COMMENT TYPE 1: A51 / ASM51 Assembler
.
.
.
  C:\Keil_v5\C51\LIB\C51S.LIB (GETCHAR)
         COMMENT TYPE 1: A51 / ASM51 Assembler
  C:\Keil_v5\C51\LIB\C51S.LIB (UNGETC)
         COMMENT TYPE 1: A51 / ASM51 Assembler

Memory Classes

The active memory classes section includes the base address (used for segments defined with OFFS), starting address, ending address, and number of bytes used for each memory class in the program.

ACTIVE MEMORY CLASSES OF MODULE

BASE        START       END         USED      MEMORY CLASS
==========================================================
X:000000H   X:000000H   X:00FFFFH             HDATA
C:000000H   C:000000H   C:00FFFFH             ECODE
B00:0000H   C:000000H   C:00FFFFH             HCONST
C:000000H   C:000000H   C:00FFFFH   001B7DH   CODE
I:000000H   I:000000H   I:00007FH   000055H   DATA
X:000000H   X:000000H   X:00FFFFH   001FF8H   XDATA
I:000020H.0 I:000020H.0 I:00002FH.7 000001H.7 BIT
I:000000H   I:000000H   I:0000FFH   000010H   IDATA

Memory Map

The memory map lists the starting and ending address, type, relocation type, alignment, tgroup, group, combination type, class, and name of each section in the program. The NOMAP directive suppresses output of this table.

MEMORY MAP OF MODULE:  Measure (MEASURE)

START     STOP      LENGTH    ALIGN  RELOC    MEMORY CLASS   SEGMENT NAME
=========================================================================

* * * * * * * * * * *   D A T A   M E M O R Y   * * * * * * * * * * * * *
000000H   000007H   000008H   ---    AT..     DATA           "REG BANK 0"
000008H   00000FH   000008H   ---    AT..     DATA           "REG BANK 1"
000010H   000010H   000001H   BYTE   UNIT     DATA           ?DT?GETCHAR
000011H   00001FH   00000FH   BYTE   UNIT     IDATA          _IDATA_GROUP_
000020H.0 000021H.2 000001H.3 BIT    UNIT     BIT            _BIT_GROUP_
000021H.3 000021H.5 000000H.3 BIT    UNIT     BIT            ?BI?MEASURE
000021H.6 000021H.6 000000H.1 BIT    UNIT     BIT            ?BI?GETCHAR
000021H.7 000021H   000000H.1 ---    ---      **GAP**
000022H   00004DH   00002CH   BYTE   UNIT     DATA           _DATA_GROUP_
00004EH   000065H   000018H   BYTE   UNIT     DATA           ?DT?MEASURE
000066H   000066H   000001H   BYTE   UNIT     IDATA          ?STACK

* * * * * * * * * * *   C O D E   M E M O R Y   * * * * * * * * * * * * *
000000H   000002H   000003H   ---    OFFS..   CODE           ?CO??C_STARTUP?0
000003H   000007H   000005H   BYTE   UNIT     CODE           ?PR?GETCHAR?UNGETCHAR
000008H   00000AH   000003H   ---    ---      **GAP**
00000BH   00000DH   000003H   BYTE   OFFS..   CODE           ?MEASURE?0000B
00000EH   0007B0H   0007A3H   BYTE   UNIT     CODE           ?C?LIB_CODE
0007B1H   000C1FH   00046FH   BYTE   UNIT     CODE           ?PR?PRINTF?PRINTF
000C20H   001045H   000426H   BYTE   UNIT     CODE           ?CO?MEASURE
001046H   001394H   00034FH   BYTE   UNIT     CODE           ?PR?SCANF?SCANF
001395H   001527H   000193H   BYTE   UNIT     CODE           ?PR?MAIN?MEASURE
001528H   00160DH   0000E6H   BYTE   UNIT     CODE           ?PR??C?ATOF??C?ATOF
00160EH   0016D8H   0000CBH   BYTE   UNIT     CODE           ?PR?TIMER0?MEASURE
.
.
.
* * * * * * * * * * *  X D A T A   M E M O R Y  * * * * * * * * * * * * *
000000H   001FF7H   001FF8H   BYTE   UNIT     XDATA          ?XD?MEASURE

Overlay Map

The overlay-map displays the structure of the program and the location of the bit, data, idata, pdata, and xdata segments of each function. It is textual representation of the call tree for the program. The NOMAP directive suppresses output of this table.

Bit, data, idata, pdata, and xdata variables are part of the BIT_GROUP, DATA_GROUP, IDATA_GROUP, PDATA_GROUP, and XDATA GROUP respectively.

OVERLAY MAP OF MODULE:   Measure (MEASURE)

FUNCTION/MODULE                         BIT_GROUP   DATA_GROUP   IDATA_GROUP
--> CALLED FUNCTION/MODULE             START  STOP  START  STOP  START  STOP
============================================================================
?C_C51STARTUP                          ----- -----  ----- -----  ----- -----
  +--> ?PR?MAIN?MEASURE
  +--> ?C_INITSEG

The ?C_C51STARTUP segment is the startup code. In this example, it calls the C runtime initialization routine (?C_INITSEG) and the main C function (?PR?MAIN?MEASURE). It requires no bit, data, or idata variable space.

MAIN/MEASURE                           ----- -----  0022H 0024H  0011H 001FH
  +--> ?PR?CLEAR_RECORDS?MEASURE
  +--> ?CO?MEASURE
  +--> ?PR?PRINTF?PRINTF
  +--> ?PR?_GETLINE?GETLINE
  +--> ?PR?_TOUPPER?TOUPPER
  +--> ?PR?MEASURE
  +--> ?PR?_READ_INDEX?MEASURE
  +--> ?PR?_GETKEY?_GETKEY
  +--> ?PR?MEASURE_DISPLAY?MCOMMAND
  +--> ?PR?_SET_TIME?MCOMMAND
  +--> ?PR?_SET_INTERVAL?MCOMMAND

The main C function requires 3 bytes of data space and 15 bytes of idata space. It calls the listed segments. Most of these segments are program segments (?PR?). However, the ?CO?MEASURE segment is a constant segment. This means that main accesses some constant data stored in code space (probably a string or lookup table).

*** NEW ROOT *************************

TIMER0/MEASURE                         ----- -----  ----- -----  ----- -----
  +--> ?PR?SAVE_CURRENT_MEASUREMENTS?MEASURE

SAVE_CURRENT_MEASUREMENTS/MEASURE      ----- -----  ----- -----  ----- -----
  +--> ?PR?MEASURE

As new program roots are discovered, they are indicated in the overlay map. In this case, the timer 0 interrupt service routine creates a new overlay analysis root so that the interrupt routine is not overlaid with the main program.

Interbank Call Table

Code banking applications contain an Interbank Call Table that lists all functions called from different code banks.

INTERBANK CALL TABLE OF MODULE: Bank_ex1 (C_ROOT)

ADDRESS    FUNCTION NAME
------------------------
 04CDH     FUNC2A
 04D2H     FUNC2B
 04D7H     _ID_CALL
 04DCH     FUNC0
 04E1H     FUNC1
 04E6H     FUNC2

The Address specified is the entry address used by the linker for function calls from different code banks, the common area, or indirect function calls (via function pointer).

Public Symbols

The public symbols table displays the value, name, class, and type for public symbols. The PRINTCONTROLS(NOPUBLICS) directive may be used to suppress output of public symbols in the listing file.

PUBLIC SYMBOLS OF MODULE:  Measure (MEASURE)

      VALUE       CLASS    TYPE      PUBLIC SYMBOL NAME
      =================================================
      00000031H   DATA     ---       ?_PRINTF?BYTE
      0000002EH   DATA     ---       ?_SCANF?BYTE
      00000031H   DATA     ---       ?_SPRINTF?BYTE
      0000002EH   DATA     ---       ?_SSCANF?BYTE
      00000010H   DATA     ---       ?_UNGETCHAR?BYTE
      00000020H.6 BIT      ---       ?C?ATOFFIRSTCALL
      01000357H   CODE     ---       ?C?CASTF
      01000767H   CODE     ---       ?C?CCASE
      00000021H.6 BIT      ---       ?C?CHARLOADED
      0100069AH   CODE     ---       ?C?CLDOPTR
      01000681H   CODE     ---       ?C?CLDPTR
      00000000H   NUMBER   ---       ?C?CODESEG
      0100065BH   CODE     ---       ?C?COPY
      010006C7H   CODE     ---       ?C?CSTPTR
      01000323H   CODE     ---       ?C?FCASTC
      0100031EH   CODE     ---       ?C?FCASTI
      01000319H   CODE     ---       ?C?FCASTL
      01000015H   CODE     ---       ?C?FPADD
      0100153BH   CODE     ---       ?C?FPATOF
      010002AEH   CODE     ---       ?C?FPCMP
      010002ACH   CODE     ---       ?C?FPCMP3
      01000407H   CODE     ---       ?C?FPCONVERT
      0100020FH   CODE     ---       ?C?FPDIV
      0100038EH   CODE     ---       ?C?FPGETOPN2
      01000106H   CODE     ---       ?C?FPMUL
      010003C3H   CODE     ---       ?C?FPNANRESULT
      0100050AH   CODE     ---       ?C?FPNEG
.
.
.
*SFR* 000000D0H.6 DATA     BIT       AC
*SFR* 000000E0H   DATA     BYTE      ACC
*SFR* 000000D8H   DATA     BYTE      ADCON
*SFR* 000000D9H   DATA     BYTE      ADDAT
*SFR* 000000D8H.3 DATA     BIT       ADM
*SFR* 000000F0H   DATA     BYTE      B
*SFR* 000000D8H.7 DATA     BIT       BD
*SFR* 000000D8H.4 DATA     BIT       BSY
*SFR* 000000C1H   DATA     BYTE      CCEN
*SFR* 000000C3H   DATA     BYTE      CCH1
*SFR* 000000C5H   DATA     BYTE      CCH2
*SFR* 000000C7H   DATA     BYTE      CCH3
*SFR* 000000C2H   DATA     BYTE      CCL1

Symbol Table

The symbol table contains symbolic information obtained from the input modules. Included are the value, representation, class, type, and name for all symbols. The PRINTCONTROLS directive may be used to suppress output of comments, line number, public symbol, and local symbol debug information in the listing file.

SYMBOL TABLE OF MODULE:  Measure (MEASURE)

      VALUE       REP       CLASS    TYPE      SYMBOL NAME
      ====================================================
      ---         MODULE    ---      ---       MEASURE
      00000062H   PUBLIC    DATA     ---       interval
      0000005FH   PUBLIC    DATA     WORD      savefirst
      0000005BH   PUBLIC    DATA     ---       setinterval
      02000000H   PUBLIC    XDATA    ---       save_record
      00000059H   PUBLIC    DATA     WORD      sindex
      0000004EH   PUBLIC    DATA     ---       current
      01001036H   PUBLIC    CODE     ---       ERROR
      01001395H   PUBLIC    CODE     ---       main
      0100160EH   PUBLIC    CODE     ---       timer0
      000000C8H   SFRSYM    DATA     BIT       T2I0
      000000C3H   SFRSYM    DATA     BYTE      CCH1
      00000080H   SFRSYM    DATA     BYTE      P0
      000000C8H.1 SFRSYM    DATA     BIT       T2I1
      000000C5H   SFRSYM    DATA     BYTE      CCH2
      00000090H   SFRSYM    DATA     BYTE      P1
      000000C7H   SFRSYM    DATA     BYTE      CCH3
      000000A0H   SFRSYM    DATA     BYTE      P2
      000000B0H   SFRSYM    DATA     BYTE      P3
      000000B0H.4 SFRSYM    DATA     BIT       T0
      000000D0H.6 SFRSYM    DATA     BIT       AC
.
.
.
      01001A5DH   BLOCK     CODE     ---       LVL=0
      01001A5DH   LINE      CODE     ---       #69
      01001A5DH   LINE      CODE     ---       #70
      01001A74H   LINE      CODE     ---       #71
      01001A83H   LINE      CODE     ---       #72
      01001A8DH   LINE      CODE     ---       #73
      01001AA3H   LINE      CODE     ---       #74
      01001AA3H   LINE      CODE     ---       #75
      ---         BLOCKEND  ---      ---       LVL=0
.
.
.
      ---         MODULE    ---      ---       MCOMMAND
      010016D9H   PUBLIC    CODE     ---       _set_interval
      01001933H   PUBLIC    CODE     ---       _set_time
      00000025H   PUBLIC    DATA     BYTE      ?measure_display?BYTE
      01001A01H   PUBLIC    CODE     ---       measure_display
      000000C8H   SFRSYM    DATA     BIT       T2I0
      000000C3H   SFRSYM    DATA     BYTE      CCH1
      00000080H   SFRSYM    DATA     BYTE      P0
      000000C8H.1 SFRSYM    DATA     BIT       T2I1
      000000C5H   SFRSYM    DATA     BYTE      CCH2
      00000090H   SFRSYM    DATA     BYTE      P1
      000000C7H   SFRSYM    DATA     BYTE      CCH3
      000000A0H   SFRSYM    DATA     BYTE      P2
      000000B0H   SFRSYM    DATA     BYTE      P3
      000000B0H.4 SFRSYM    DATA     BIT       T0
      000000D0H.6 SFRSYM    DATA     BIT       AC
      000000C2H   SFRSYM    DATA     BYTE      CCL1
      000000E8H   SFRSYM    DATA     BYTE      P4
      000000B0H.5 SFRSYM    DATA     BIT       T1
      000000C4H   SFRSYM    DATA     BYTE      CCL2

Function Masks

Function masks are created when global register optimization is enabled by the REGFILE directive. The register mask is a 32-bit number that indicates which registers are used by a function. Each bit in the mask refers to one register. The encoding for the register mask is as follows:

Bit Position
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
      C ANY DPH DPL                  
Bit Position
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
        A B     R7 R6 R5 R4 R3 R2 R1 R0

Special values of the register mask may be used as well:

  • 0x80000000 specifies that the function uses no registers.

For example, a register mask value of 0x0800000F indicates that the function uses R3, R2, R1, and R0.

FUNCTION REGISTER MASKS

FUNCTION . . . . . . . . . REG MASK
====================================

_abs . . . . . . . . . . . @0x180008c0
_cabs. . . . . . . . . . . @0x18000880
_free. . . . . . . . . . . @0x1e000cf5
_init_mempool. . . . . . . @0x1e0008f0
_labs. . . . . . . . . . . @0x180008f0
_malloc. . . . . . . . . . @0x1e0008fc
_output_setup. . . . . . . @0x80000000
_strcat. . . . . . . . . . @0x1e00088e
_strncpy . . . . . . . . . @0x1e0008df
_ti_clear. . . . . . . . . @0x3e000cff
bp_buffer_start. . . . . . @0x80000000
bp_char_start. . . . . . . @0x80000000
bp_done. . . . . . . . . . @0x80000000
bp_float_start . . . . . . @0x80000000

Cross Reference

A cross reference listing is generated when the IXREF directive is specified on the linker command line. It includes the section name as well as its representation (LABEL, VAR, CONST), TGroup, the name of the module in which it is defined and all modules in which it is accessed.

INTER-MODULE CROSS-REFERENCE LISTING

NAME . . . . . . . . . CLASS    MODULE NAMES
============================================

?_PRINTF?BYTE. . . . . DATA     PRINTF  MCOMMAND  MEASURE
?_SCANF?BYTE . . . . . DATA     SCANF
?_SPRINTF?BYTE . . . . DATA     PRINTF
?_SSCANF?BYTE. . . . . DATA     SCANF  MCOMMAND  MEASURE
?_UNGETCHAR?BYTE . . . DATA     GETCHAR  UNGETC
?C?ATOFFIRSTCALL . . . BIT      ?C?ATOF  SCANF
?C?CASTF . . . . . . . CODE     ?C?CASTF  MCOMMAND
?C?CCASE . . . . . . . CODE     ?C?CCASE  MEASURE  PRINTF  SCANF
?C?CHARLOADED. . . . . BIT      GETCHAR  UNGETC
?C?CLDOPTR . . . . . . CODE     ?C?CLDOPTR  PRINTF
?C?CLDPTR. . . . . . . CODE     ?C?CLDPTR  PRINTF  SCANF
?C?CODESEG . . . . . . NUMBER   ** LX51 GENERATED **
?C?COPY. . . . . . . . CODE     ?C?COPY  MCOMMAND  MEASURE
?C?CSTPTR. . . . . . . CODE     ?C?CSTPTR  PRINTF  SCANF
?C?FCASTC. . . . . . . CODE     ?C?FCAST  ?C?ATOF  MCOMMAND
?C?FCASTI. . . . . . . CODE     ?C?FCAST
?C?FCASTL. . . . . . . CODE     ?C?FCAST

Program Size

Program size information is output near the end of the listing file. The size of various memory areas as well as constant and code space are output.

Program Size: data=102.7 xdata=8184 const=0 code=7058

Total program ROM size is obtained by adding the const and code sizes.

Warnings and Errors

Problems encountered while linking a program generate errors and warnings that are output to the screen and to the map file.

LX51 RUN COMPLETE.  0 WARNING(S),  0 ERROR(S)
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.