Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 User Manual

Product codes
SW006021-1
Page of 518
Linker
 2012 Microchip Technology Inc.
DS52053B-page 289
7.4.2.4
SEGMENT LISTING
The class listing in the map file is followed by a listing of segments. A segment is con-
ceptual grouping of contiguous psects in the same memory space, and are used by the 
linker as an aid in psect placement. There is no segment assembler directive and 
segments cannot be controlled in any way.
This section is heralded by the line that contains the headings:
SEGMENTS   Name  Load  Length  Top  Selector  Space  Class
The name of a segment is derived from the psect in the contiguous group with the low-
est link address. This can lead to confusion with the psect with the same name. Do not 
read psect information from this section of the map file.
Typically this section of the map file can be ignored by the user.
7.4.2.5
UNUSED ADDRESS RANGES
The last of the memory summaries show the memory is has not been allocated, and is 
hence unused. The linker is aware of any memory allocated by the code generator (for 
absolute variables), and so this free space is accurate.
This section follows the heading:
UNUSED ADDRESS RANGES
and is followed by a list of classes and the memory still available in each class. If there 
is more than one memory range available in a class, each range is printed on a 
separate line. Any paging boundaries within a class are not displayed, but the column 
Largest block shows the largest contiguous free space which takes into account any 
paging in the memory range. If you are looking to see why psects cannot be placed into 
memory (e.g., cant-find-space type errors) then this important information to study.
Note that the memory associated with a class can overlap that in others, thus the total 
free space is not simply the addition of all the unused ranges.
7.4.2.6
SYMBOL TABLE
The final section in the map file list global symbols that the program defines. This 
section has a heading:
Symbol Table
and is followed by two columns in which the symbols are alphabetically listed. As 
always with the linker, any C derived symbol is shown with its assembler equivalent 
symbol name. See Section 5.12.3 “Interaction Between Assembly and C Code”.
The symbols listed in this table are:
• Global assembly labels
• Global EQU /SET assembler directive labels
• Linker-defined symbols
Assembly symbols are made global via the GLOBAL assembler directive, see 
Section 6.4.9.1 “GLOBAL” for more information.
Linker-defined symbols act like EQU directives; however, they are defined by the linker 
during the link process, and no definition for them will appear in any source or 
intermediate file. See Section 5.15.6 “Linker-Defined Symbols”.
Each symbol is shown with the psect in which they are placed, and the value (usually 
an address) which the symbol has been assigned. There is no information encoded into 
a symbol to indicate whether it represents code or data, nor in which memory space it 
resides.