0

The objdump man page gives the following example output from objdump -t:

The format of the output depends upon the format of the file being dumped, but there are two main types. One looks like this:

[ 4](sec 3)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .bss [ 6](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 fred 

where the number inside the square brackets is the number of the entry in the symbol table, the sec number is the section number, the fl value are the symbol's flag bits, the ty number is the symbol's type, the scl number is the symbol's storage class and the nx value is the number of auxilary entries associated with the symbol. The last two fields are the symbol's value and its name.

So scl means storage class, but it never explains what scl 3 or scl 2 actually mean.

Where can that information be found?

1 Answer 1

0

The scl values are defined in binutils-gdb/include/coff/internal.h:

/********************** STORAGE CLASSES **********************/ /* This used to be defined as -1, but now n_sclass is unsigned. */ #define C_EFCN 0xff /* physical end of function */ #define C_NULL 0 #define C_AUTO 1 /* automatic variable */ #define C_EXT 2 /* external symbol */ #define C_STAT 3 /* static */ #define C_REG 4 /* register variable */ #define C_EXTDEF 5 /* external definition */ #define C_LABEL 6 /* label */ #define C_ULABEL 7 /* undefined label */ #define C_MOS 8 /* member of structure */ #define C_ARG 9 /* function argument */ #define C_STRTAG 10 /* structure tag */ #define C_MOU 11 /* member of union */ #define C_UNTAG 12 /* union tag */ #define C_TPDEF 13 /* type definition */ #define C_USTATIC 14 /* undefined static */ #define C_ENTAG 15 /* enumeration tag */ #define C_MOE 16 /* member of enumeration */ #define C_REGPARM 17 /* register parameter */ #define C_FIELD 18 /* bit field */ #define C_AUTOARG 19 /* auto argument */ #define C_LASTENT 20 /* dummy entry (end of block) */ #define C_BLOCK 100 /* ".bb" or ".eb" */ #define C_FCN 101 /* ".bf" or ".ef" */ #define C_EOS 102 /* end of structure */ #define C_FILE 103 /* file name */ #define C_LINE 104 /* line # reformatted as symbol table entry */ #define C_ALIAS 105 /* duplicate tag */ #define C_HIDDEN 106 /* ext symbol in dmert public lib */ #define C_WEAKEXT 127 /* weak symbol -- GNU extension. */ /* New storage classes for TI COFF */ #define C_UEXT 19 /* Tentative external definition */ #define C_STATLAB 20 /* Static load time label */ #define C_EXTLAB 21 /* External load time label */ #define C_SYSTEM 23 /* System Wide variable */ /* New storage classes for WINDOWS_NT */ #define C_SECTION 104 /* section name */ #define C_NT_WEAK 105 /* weak external */ /* New storage classes for 80960 */ /* C_LEAFPROC is obsolete. Use C_LEAFEXT or C_LEAFSTAT */ #define C_LEAFPROC 108 /* Leaf procedure, "call" via BAL */ #define C_SCALL 107 /* Procedure reachable via system call */ #define C_LEAFEXT 108 /* External leaf */ #define C_LEAFSTAT 113 /* Static leaf */ #define C_OPTVAR 109 /* Optimized variable */ #define C_DEFINE 110 /* Preprocessor #define */ #define C_PRAGMA 111 /* Advice to compiler or linker */ #define C_SEGMENT 112 /* 80960 segment name */ /* New storage classes for RS/6000 */ #define C_HIDEXT 107 /* Un-named external symbol */ #define C_BINCL 108 /* Marks beginning of include file */ #define C_EINCL 109 /* Marks ending of include file */ #define C_AIX_WEAKEXT 111 /* AIX definition of C_WEAKEXT. */ #define C_DWARF 112 /* DWARF symbol */ 

So scl 3 means that the variable is static and scl 2 means that it is extern.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.