typedef struct {
Elf32_Word st_name; Elf32_Addr st_value; Elf32_Word st_size; unsigned char st_info; unsigned char st_other; Elf32_Half st_shndx; } Elf32_Sym; |
st_name
This member is always 0.st_value
For a defined symbol, this member holds its section offset. That is, st_value is a byte offset from the beginning of the section that st_shndx identifies. For an undefined symbol, it holds 0.st_size
This member is always 0.st_info
This member specifies a symbol's binding attribute and type. Table 2.1.1 shows the bindings and types for different symbols. Table 2.1.2 shows how to manipulate the value of st_info with macros (defined in sys/elf.h):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
st_other
This member holds a symbol's unique non-negative sequence number.st_shndx
Every symbol is defined in relation to some section; this member holds the relevant section header table index. Table 2.1.3 shows its values.table of contentTable 2.1.3 Section Header Table Indices of Symbols
Section Header Table Index Symbol UNDEF_NDX undefined symbol TEXT_NDX symbol defined in .text section DATA_NDX symbol defined in .data section BSS_NDX symbol defined in .bss section