stshndx
stshndx, or st_shndx, refers to the section index field in an ELF symbol table entry. In each symbol table entry, which includes fields such as st_name, st_value, st_size, st_info, st_other, and st_shndx, the st_shndx value indicates the section header table index with which the symbol is associated. The field is a 16-bit value and is interpreted by the linker and tools that process ELF objects.
A non-special, valid value of st_shndx is the index of a real section header in the object
- SHN_UNDEF (0): the symbol is undefined in the current object; its definition is expected to come
- SHN_ABS (0xFFF1): the symbol has an absolute value; it is not tied to any section.
- SHN_COMMON (0xFFF2): the symbol is a common symbol, a tentative definition that requires allocation.
- SHN_XINDEX (0xFFFF): indicates that the real section index does not fit in the 16-bit field and
There are also reserved ranges, such as SHN_LORESERVE and SHN_HIRESERVE, that delimit values used for special