3.2.5 Symbol Information

When -show=symbol is specified, the addresses, sizes, and types of externally defined symbols or static internally defined symbols are output in the order of address. When -show=reference is specified, the symbol reference counts and optimization information are also output. The following figure shows an example of symbol information output.

*** Symbol List ***
SECTION=(1)
                (3)          (4)           (5)
FILE=(2)        START        END           SIZE
  (6)           (7)          (8)           (9)                 (10)    (11)
  SYMBOL        ADDR         SIZE          INFO                COUNTS  OPT
SECTION=P
FILE=test.obj
                00000000     00000428          428
  _main
                00000000            2      func ,g                 0
  _malloc
                00000000           32      func ,l                 0
FILE=mvn3
                00000428     00000490           68
  $MVN#3
                00000428            0      none ,g                 0

Item Number

Description

(1)

Section name

(2)

File name

(3)

Start address of a section included in the file indicated by (2) above

(4)

End address of a section included in the file indicated by (2) above

(5)

Section size of a section included in the file indicated by (2) above

(6)

Symbol name

(7)

Symbol address

(8)

Symbol size

(9)

Symbol type as shown below

Data type:

func: Function name

data: Variable name

entry: Entry function name

none:Undefined (label, assembler symbol)

Declaration type

g: External definition

l: Internal definition

(10)

Symbol reference count only when -show=reference is specified. * is output when show=reference is not specified.

(11)

Optimization information as shown below.

ch: Symbol modified by optimization

cr: Symbol created by optimization

mv: Symbol moved by optimization

 

When the -show=struct option is specified, the addresses for the structure and union members that are defined in the source file for which the -debug option was specified at compilation are output. The output example of the symbol information is shown below.

*** Symbol List ***
 
SECTION=
FILE=                               START        END    SIZE
  SYMBOL                            ADDR        SIZE    INFO      COUNTS  OPT
    STRUCT                                      SIZE
    (1)                                         (2)
      MEMBER                        ADDR        SIZE    INFO
      (3)                           (4)         (5)     (6)
 
SECTION=B
FILE=tp.obj
                                  00000000  0000000b         c
  _st
                                  00000000         c   data ,g         0
    struct  {
                                                   c
      _st.mem1
                                  00000000         1   char
      _st.mem2
                                  00000004         4   int
      _st.mem3
                                  00000008         2   short
    }

Number

Desctiption

(1)

struct is output for a structure or union is output for a union.

(2)

Total size of the structure or union.

(3)

The member name is concatenated after a symbol name with a dot (.).

(4)

The member address is output.

(5)

The member size is output.

(6)

The member type is output.