C.PDF

(106 KB) Pobierz
Appendix C
LINKER MAP FILE FORMAT
C.1
INTRODUCTION
The Linker optionally produces a memory map listing file when the command line
-M
is
specified. See Chapter 1, Running the Linker for more information on command line and
map listing options. If the
-M
command line option is given, the map listing goes to the file
named as the option argument; if no argument is specified, the map listing file takes the
name of the first object file on the command line and changes the extension to .MAP (see
Chapter 1).
C.2
MAP FILE COMMENTARY
Figure C-1 is a Linker-generated map listing of a sample application. The listing illustrates
a selection of the format and reporting features provided by the Linker. The following sec-
tion highlights some of those features.
At the top of every map listing page is a banner which identifies the Linker and lists its
version number, the date and time of linking, the current input file name, and the page
number. The map file page length, width, and margins can be controlled by the memory
control file
MAP PAGE
record (see Chapter 3, MAP PAGE Map File Format Control).
The first titled grouping in the report is a list of sections sorted by starting address. This
list of sections is subdivided by DSP memory and ordered by counter such that all X de-
fault (counter 0) memory references are grouped together, followed by X low (counter 1)
memory, and so forth. Each line gives the starting address, ending address, and length of
every uniquely-named section in the Linker input stream if that section contained code or
data for the current memory space. The length reflects the total of all section fragments
assimilated from separate input files. As a result there is only one line for each section
even if the section appears in different files. If sections are located such that they overlap
in memory the Linker will flag the overlap in the map file to the right of the section name.
The link map also shows any unused memory areas between allocated blocks. These
lines may be disabled using the
MAP OPT NOUNUSED
directive (see Chapter 3, MAP
OPT Map File Contents Control).
A section name may be repeated for a given memory space if that section contains buff-
ers, overlays, or absolute blocks. In this case the start, end, and size of the block is re-
ported and the type of block is placed to the right of the section name. On page 1 of the
MOTOROLA
DSP LINKER/LIBRARIAN REFERENCE MANUAL
C-1
Linker Map File Format
Map File Commentary
example listing section SECT1 contains a modulo buffer of length 32 starting at address
20 hexadecimal in X memory. On the same page the section SECT2 has an overlay seg-
ment of length 7 that is loaded at address 12 hexadecimal in P memory. The listing of sec-
tions by address can be turned off with the memory control file
MAP OPT NOSECADDR
directive (see Chapter 3, MAP OPT Map File Contents Control).
The next titled grouping on the map report (page 2) is a list of sections sorted by name.
The name of the section is given along with the start, end, and length of blocks in each
DSP memory space. As in the section by address listing special blocks such as buffers or
overlays are shown on a line by themselves. The section by name report can be disabled
by using the memory control file
MAP OPT NOSECNAME
directive (see Chapter 3, MAP
OPT Map File Contents Control).
After the section-oriented reports there appears on page 3 of the map file a symbol listing
ordered by name. Each line starts with the symbol name (truncated to 16 characters), fol-
lowed by the symbol type (integer or floating point), the memory space if any and value,
the name of the section in which the symbol is defined, and the symbol attributes. A sym-
bol can be absolute or relative (REL), local, XDEFed (EXTERN), or global, and possibly
associated with a buffer or overlay. This portion of the map listing may be omitted through
the memory control file
MAP OPT NOSYMNAME
directive (see Chapter 3, MAP OPT
Map File Contents Control).
The last page of the listing shows a symbol listing sorted by value. The listing by value can
be turned off with the memory control file
MAP OPT NOSYMVAL
directive (see Chapter
3, MAP OPT Map File Contents Control).
The final report group lists the unresolved externals found during the link phase. This con-
sists of all the symbol references for which there was no corresponding definition found in
the link input. The Linker indicates the symbol name and the module in which the refer-
ence was made.
C-2
DSP LINKER/LIBRARIAN REFERENCE MANUAL
MOTOROLA
Linker Map File Format
Map File Commentary
MOTOROLA
DSP ASSEMBLER REFERENCE MANUAL
C-3
Linker Map File Format
Map File Commentary
C-4
DSP ASSEMBLER REFERENCE MANUAL
MOTOROLA
Linker Map File Format
Map File Commentary
MOTOROLA
DSP ASSEMBLER REFERENCE MANUAL
C-5
Zgłoś jeśli naruszono regulamin