This chapter contains the following sections:
Assembler List File Format
The assembler list file is an additional output file of the assembler that contains information about the generated code.
The list file consists of a page header and a source listing.
The page header consists of four lines:
TASKING TriCore VX-toolset Assembler vx.yrz Build nnn SN 00000000 This is the page header title Page 1 ADDR CODE CYCLES LINE SOURCE LINE
The first line contains information about the assembler name, version number and serial number. The second line contains a title specified by the TITLE (first page) assembler directive and a page number. The third line is empty. The fourth line contains the heading of the source listing.
The following is a sample part of a listing. An explanation of the different columns follows below.
ADDR CODE CYCLES LINE SOURCE LINE . . 0002 850F0008 26 ld.a a15,world 0006 F4AF 27 st16.a [a10],a15 0008 91000040 28 movh.a a4,#@his(_2_ini) 000C D9440000 29 lea a4,[a4]@los(_2_ini) 0010 1D000000 30 jg printf . . 0000 44 buf: .space 4 | RESERVED 0003
The meaning of the different columns is:
ADDR This column contains the memory address. The address is a hexadecimal number that represents the offset from the beginning of a relocatable section or the absolute address for an absolute section. The address only appears on lines that generate object code.
CODE This is the object code generated by the assembler for this source line, displayed in hexadecimal format. For lines that allocate space, the code field contains the text "RESERVED".
CYCLES The first number in this column is the number of instruction cycles needed to execute the instruction(s) as generated in the CODE field. The second number is the accumulated cycle count of this section.
LINE This column contains the line number. This is a decimal number indicating each input line, starting from 1 and incrementing with each source line.
SOURCE LINE This column contains the source text. This is a copy of the source line from the assembly source file.
For the SET
and EQU
directives the ADDR and CODE columns do not apply. The symbol value is listed instead.
See section 6.7
, Generating a List File, in Chapter Using the Assembler of the User's Guide for more information
on how to generate a list file and specify the amount of list file information.
The linker map file is an additional output file of the linker that shows how the link phase has mapped the sections and symbols from the various object files (.o) to output sections. The locate part shows the absolute position of each section. External symbols are listed per space with their absolute address, both sorted on symbol and sorted on address.
With the linker option -m (map file formatting) you can specify which parts of the map file you want to see.
TriCore VX-toolset object linker - mapfile (task: task1) ----------------------------------------------------------------------------------------- **************************************** File Part ************************************ * Processed files: ================== File | From archive | Symbol causing the extraction --------------------------------------------------------- cstart.o | libc.a | _START hello.o | | printf.o | libc.a | printf ************************************* Call Graph Part *********************************
**************************************** Link Part ************************************ * Section translation: ====================== [in] File | [in] Section | [in] Size | [out] Offset | [out] Section --------------------------------------------------------------------------------------- hello.o | .text.hello.main | 0x00000014 | 0x00000000 | .text.hello.main --------------------------------------------------------------------------------------- cstart.o | .text.libc | 0x000001ce | 0x00000000 | .text.libc strcpy.o | .text.libc | 0x00000024 | 0x000001d0 | cinit.o | .text.libc | 0x0000004e | 0x000001f4 | --------------------------------------------------------------------------------------- printf.o | .text.printf.printf | 0x0000002a | 0x00000000 | .text.printf.printf
*********************************** Cross Reference Part ****************************** * Defined symbols: ================== Definition file | Definition section | Symbol | Referenced in --------------------------------------------------------------------------------------- _doflt.o | .text._doflt._doflt | _doflt | _doprint.o _doprint.o | .text._doprint._doprint | _doprint | printf.o cstart.o | .text.libc.reset | _START | hello.o hello.o | .text.hello.main | main | cstart.o hello.o | .zdata.hello.world | world | * Undefined symbols: ==================== Symbol | Referenced in --------------------------------------------------------------------------------------- _LITERAL_DATA_ | cstart.o _SMALL_DATA_ | cstart.o _lc_cp | cinit.o
*************************************** Overlay Part **********************************
*************************************** Locate Part *********************************** * Section translation: ====================== Space | Chip | Group | Section | Size | Space addr | Chip addr --------------------------------------------------------------------------------------- TC1920:tc:csa | dsram | | csa | 0x00001000 | 0xd0000000 | 0x00000000 --------------------------------------------------------------------------------------- TC1920:tc:linear | ext_c | cstart | .text.libc | 0x00000242 | 0xa0000000 | 0x00000000 | ext_c2| | [.data.libc]| 0x000000f8 | 0xb0000000 | 0x00000000
* Symbol translation: ===================== Space | Symbol | Address || Space | Address | Symbol --------------------------------------------------------------------------------------- TC1920:tc:csa | _lc_ub_csa | 0xd0000000 || TC1920:tc:csa | 0xd0000000 | _lc_ub_csa | _lc_ue_csa | 0xd0001000 || | 0xd0001000 | _lc_ue_csa --------------------------------------------------------------------------------------- TC1920:tc:linear | _START | 0xa0000242 || TC1920:tc:linear | 0xa000013c | _exit | _exit | 0xa000013c || | 0xa0000242 | _START | printf | 0xa0001f90 || | 0xa0001f90 | printf ********************************* Linker Script File Part ***************************** *************************************** Memory Part ***********************************
The meaning of the different parts is:
This part of the map file shows all processed files. This also includes object files that are extracted from a library, with the symbol that led to the extraction
This part of the map file contains a schematic overview that shows how (library) functions call each other. To obtain call graph information, the assembly file must contain .CALLS directives which you must manually add to the assembly source.
By default this part is not shown in the map file. You have to turn this part on manually with linker option -mc (call graph info).
This part of the map file shows per object file how the link phase has mapped the sections from the various object files (.o) to output sections.
[in] File The name of an input object file.
[in] Section A section name from the input object file.
[in] Size The size of the input section.
[out] Offset The offset relative to the start of the output section.
[out] Section The resulting output section name.
The input sections .text.libc in the object modules cstart.o, strcpy.o and cinit.o in the example above are all mapped on the output section .text.libc on succeeding offsets.
This part of the map file lists all symbols defined in the object modules and for each symbol the object modules that contain a reference to the symbol are shown. Also, symbols that remain undefined are shown.
By default this part is not shown in the map file. You have to turn this part on manually with linker option -mr (cross references info).
This part of the map file shows how the static stack is organized. This part is empty for the TriCore. This part also shows the locate overlay information if you used overlay groups in the linker script file.
By default this part is not shown in the map file. You have to turn this part on manually with linker option -mo (overlay info).
This part of the map file shows the absolute position of each section in the absolute object file. It is organized per address space, memory chip and group.
Space The names of the address spaces as defined in the linker script file (tc*.lsl). The names are constructed of the derivative name followed by a colon ':', the core name, another colon ':' and the space name. For example: TC1920:tc:linear
Chip The names of the memory chips as defined in the linker control file (tc.i) and the memory_layout part of the linker script file (tc*.lsl).
Group Sections can be ordered in groups. These are the names of the groups as defined in the linker script file (tc*.lsl) with the keyword group in the section_layout part.
Section The name of the section. Names within square brackets [ ] will be copied during initialization from ROM to the corresponding section name in RAM.
Size The size of the section.
Space addr The absolute address of the section in the address space.
Chip addr The absolute offset of the section from the start of a memory chip.
This part of the map file lists all external symbols per address space name, both sorted on address and sorted on symbol name.
Space The names of the address spaces as defined in the linker script file (tc*.lsl). The names are constructed of the derivative name followed by a colon ':', the core name, another colon ':' and the space name. For example: TC1920:tc:linear
Symbol The name of the symbol.
Address The absolute address of the symbol in the address space.
This part of the map file shows the processor and memory information of the linker script file.
By default this part is not shown in the map file. You have to turn this part on manually with linker option -ms (processor and memory info). You can print this information to a separate file with linker option --lsl-dump.
This part of the map file shows the memory usage in totals and percentages for spaces and chips. The largest free block of memory per space and per chip is also shown.
By default this part is not shown in the map file. You have to turn this part on manually with linker option -mm (memory usage info).
Section 7.8
, Generating a Map File, in Chapter Using the Linker of the User's Guide.
Linker option -M (Generate map file)