ARM Assembly Language Tools v18.1.0.LTS User's Guide
SPNU118U - REVISED JANUARY 2018

Cross-Reference Lister Description

The ARM cross-reference lister is a debugging tool. This utility accepts linked object files as input and produces a cross-reference listing as output. This listing shows symbols, their definitions, and their references in the linked source files.

Producing a Cross-Reference Listing

Figure 10-1 illustrates the steps required to produce a cross-reference listing.

Figure 10-1 The Cross-Reference Lister Development Flow xrefflow_tdz077.gif

Invoking the Cross-Reference Lister

To use the cross-reference utility, the file must be assembled with the correct options and then linked into an executable file. Assemble the assembly language files with the --cross_reference option. This option creates a cross-reference listing and adds cross-reference information to the object file. By default, the assembler cross-references only global symbols, but if the assembler is invoked with the --output_all_syms option, local symbols are also added. Link the object files to obtain an executable file.

To invoke the cross-reference lister, enter the following:

armxref [options] [input filename [output filename]]

armxref

is the command that invokes the cross-reference utility.
options identifies the cross-reference lister options you want to use. Options are not case sensitive and can appear anywhere on the command line following the command.
-l (lowercase L) specifies the number of lines per page for the output file. The format of the -l option is -lnum, where num is a decimal constant. For example, -l30 sets the number of lines per page in the output file to 30. The space between the option and the decimal constant is optional. The default is 60 lines per page.
-q suppresses the banner and all progress information (run quiet).
input filename is a linked object file. If you omit the input filename, the utility prompts for a filename.
output filename is the name of the cross-reference listing file. If you omit the output filename, the default filename is the input filename with an .xrf extension.

Cross-Reference Listing Example

These terms defined appear in the cross-reference listing in Example 10-1:

Symbol Name of the symbol listed
Filename Name of the file where the symbol appears
RTYP The symbol's reference type in this file. The possible reference types are:
STAT The symbol is defined in this file and is not declared as global.
EDEF The symbol is defined in this file and is declared as global.
EREF The symbol is not defined in this file but is referenced as global.
UNDF The symbol is not defined in this file and is not declared as global.
AsmVal This hexadecimal number is the value assigned to the symbol at assembly time. A value may also be preceded by a character that describes the symbol's attributes. Table 10-1 lists these characters and names.
LnkVal This hexadecimal number is the value assigned to the symbol after linking.
DefLn The statement number where the symbol is defined.
RefLn The line number where the symbol is referenced. If the line number is followed by an asterisk (*), then that reference can modify the contents of the object. A blank in this column indicates that the symbol was never used.

Table 10-1 Symbol Attributes in Cross-Reference Listing

Character Meaning
' Symbol defined in a .text section
" Symbol defined in a .data section
+ Symbol defined in a .sect section
- Symbol defined in a .bss or .usect section

Example 10-1 is an example of cross-reference listing.

Example 10-1 Cross-Reference Listing

File: bttest.out Wed Nov 13 17:07:42 xxxx Page: 1 ============================================================================= Symbol: array Filename RTYP AsmVal LnkVal DefLn RefLn RefLn RefLn ________ ____ ________ ________ ______ _______ _______ _______ module1.asm EDEF -00000001 00001001 3 1A 5 ============================================================================= Symbol: array_a Filename RTYP AsmVal LnkVal DefLn RefLn RefLn RefLn ________ ____ ________ ________ ______ _______ _______ _______ module1.asm STAT '00000004 00000004 5 9 ============================================================================= Symbol: dflag Filename RTYP AsmVal LnkVal DefLn RefLn RefLn RefLn ________ ____ ________ ________ ______ _______ _______ _______ module1.asm EDEF -00000000 00001000 2 3A 4 ============================================================================= Symbol: dflag_a Filename RTYP AsmVal LnkVal DefLn RefLn RefLn RefLn ________ ____ ________ ________ ______ _______ _______ _______ module1.asm STAT '00000000 00000000 4 11 ============================================================================= Symbol: offst Filename RTYP AsmVal LnkVal DefLn RefLn RefLn RefLn ________ ____ ________ ________ ______ _______ _______ _______ module1.asm EREF 00000000 00001068 2A 6 module2.asm EDEF -00000000 00001068 2 2A 3 ============================================================================= Symbol: offst_a Filename RTYP AsmVal LnkVal DefLn RefLn RefLn RefLn ________ ____ ________ ________ ______ _______ _______ _______ module1.asm STAT '00000008 00000008 6 10 module2.asm STAT '00000000 00000020 3 6 =============================================================================
Back to Top

Submit Documentation Feedback

Copyright© 2018, Texas Instruments Incorporated. An IMPORTANT NOTICE for this document addresses availability, warranty, changes, use in safety-critical applications, intellectual property matters and other important disclaimers.