Keil Logo

Symbol Table

The symbol table is a list of all symbols defined in the program along with the status information about the symbol. Any predefined symbols used will also be listed in the symbol table. If the XREF control is used, the symbol table will contain information about where the symbol was used in the program.

The status information includes a NAME field, a TYPE field, a VALUE field, and an ATTRIBUTES field.

The TYPE field specifies the type of the symbol: ADDR if it is a memory address, NUMB if it is a pure number (e.g., as defined by EQU), SEG if it is a relocatable segment, and REG if a register. For ADDR and SEG symbols, the segment type is added.

The VALUE field shows the value of the symbol when the assembly was completed. For REG symbols, the name of the register is given. For NUMB and ADDR symbols, their absolute value (or if relocatable, their offset) is given, followed by A (absolute) or R (relocatable). For SEG symbols, the segment size is given here. Bit address and size are given by the byte part, a period (.), followed by the bit part. The scope attribute, if any, is PUB (public) or EXT (external). These are given after the VALUE field.

The ATTRIBUTES field contains an additional piece of information for some symbols: relocation type for segments, segment name for relocatable symbols.

Example Symbol Table Listing

------ ----- -------
N A M E             T Y P E  V A L U E   ATTRIBUTES
BITVAR . . . . . .  B  SEG   000001H     REL=UNIT, ALN=BIT
DUMMY. . . . . . .  D  ADDR  000000H R   SEG=VAR1
PCONST . . . . . .  C  SEG   00000DH     REL=UNIT, ALN=BYTE
PROG . . . . . . .  C  SEG   00001BH     REL=UNIT, ALN=BYTE
PUTSTRING. . . . .  C  ADDR              EXT
PUT_CRLF . . . . .  C  ADDR              EXT
REPEAT . . . . . .  C  ADDR  000010H R   SEG=PROG
SAMPLE . . . . . .
STACK. . . . . . .  I  SEG   000010H     REL=UNIT, ALN=BYTE
START. . . . . . .  C  ADDR  000000H R   SEG=PROG
TXT. . . . . . . .  C  ADDR  000000H R   SEG=PCONST
TXTBIT . . . . . .  B  ADDR  0000H.0 R   SEG=BITVAR
VAR1 . . . . . . .  D  SEG   000021H     REL=UNIT, ALN=BYTE

If the XREF control is used, then the symbol table listing will also contain all of the line numbers of each line of code that the symbol was used. If the value of the symbol was changed or defined on a line, then that line will have a hash mark (#) following it. The line numbers are displayed in decimal.

  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.