Next: , Previous: , Up: CTF dictionaries   [Contents][Index]


2.7 The string section

This section is a simple ELF-format strtab, starting with a zero byte (thus ensuring that the string with offset 0 is the null string, as assumed elsewhere in this spec). The strtab is usually ASCIIbetically sorted to somewhat improve compression efficiency.

Where the strtab is unusual is the references to it. CTF has two string tables, the internal strtab and an external strtab associated with the CTF dictionary at open time: usually, this is the ELF dynamic strtab (.dynstr) of a CTF dictionary embedded in an ELF file. We distinguish between these strtabs by the most significant bit, bit 31, of the 32-bit strtab references: if it is 0, the offset is in the internal strtab: if 1, the offset is in the external strtab.

There is a bug workaround in this area: in format v3 (the first version to have working support for external strtabs), the external strtab is .strtab unless the CTF_F_DYNSTR flag is set on the dictionary (see section CTF file-wide flags). Format v4 will introduce a header field that explicitly names the external strtab, making this flag unnecessary.