Next: The variable section, Previous: The function info section, Up: CTF dictionaries [Contents][Index]
Before linking is complete, the symbol tables have not been laid out, so no stable ordering is present for the data object or function info sections. The compiler handles this by emitting the data object and function info sections in whatever order it pleases, and emitting a pair of index sections to help the linker reshuffle things. Each of these sections is an array of strtab offsets associated 1:1 with the corresponding data object / function info section: the strings (always in the CTF internal strtab) are the names of the corresponding symbols. At link time, the linker uses the index sections to find the intended symbol names of every entry in the data object and function info sections, and shuffles those sectiosn into the order given in the final ELF symbol table, discarding the index sections and all types in the data object and function info sections that do not have corresponding symbols in the final symbol table.
(Not yet implemented in libctf
or the linker, but will be soon.)