Lines Matching full:of
2 .\" This file and its contents are supplied under the terms of the
4 .\" You may only use this file in accordance with the terms of version
5 .\" 1.0 of the CDDL.
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source. A copy of the CDDL is also available via the Internet at
24 is designed to be a compact representation of the C programming
25 language's type information focused on serving the needs of dynamic
39 sizes of C types, including intrinsic types, enumerations, structures,
45 data may also include information about the types of global objects and
46 the return type and arguments of functions in the symbol table.
72 which describe the version of the
76 files, and the sizes of the other sections.
80 which provides a way of identifying similar groups of
85 information section, which describes the types of global
90 types and arguments of functions.
94 the format and layout of the C types themselves, and finally the last
97 section, which contains the names of types, enumerations, members, and
109 file may contain all of the type information that it requires, or it
124 A common example of this is that most kernel modules in illumos are uniquified
252 defines the version of the
254 file which defines the format of the rest of the header.
256 across versions, though the interpretation of its flags may change from
271 member defines the version of the
281 member describes aspects of the file which modify its interpretation.
289 indicates that the body of the
306 In versions two and three of the
312 file is the child of another
314 file and also indicates the size of the remaining sections.
317 logically contains a copy of the
319 and the two have a combined size of 36 bytes.
323 uint32_t cth_parlabel; /* ref to name of parent lbl uniq'd against */
324 uint32_t cth_parname; /* ref to basename of parent */
325 uint32_t cth_lbloff; /* offset of label section */
326 uint32_t cth_objtoff; /* offset of object section */
327 uint32_t cth_funcoff; /* offset of function section */
328 uint32_t cth_typeoff; /* offset of type section */
329 uint32_t cth_stroff; /* offset of string section */
330 uint32_t cth_strlen; /* length of string section in bytes */
341 The value of both members are offsets into the
343 section which point to the start of a null-terminated string.
344 For more information on the encoding of strings, see the subsection on
346 If the value of either is zero, then there is no entry for that
364 describe the beginning of the corresponding sections.
365 These offsets are relative to the end of the
367 Therefore, something with an offset of 0 is at an offset of thirty-six
368 bytes relative to the start of the
371 The difference between members indicates the size of the section itself.
373 The start of the
385 To calculate the size of a given section, excepting the
387 section, one should subtract the offset of the section from the following one.
388 For example, the size of the
397 describes the length of the string section itself.
398 From it, you can also calculate the size of the entire
400 file by adding together the size of the
402 the offset of the string section in
404 and the size of the string section in
414 version 2 had a much smaller limit of 32767 types.
425 enable the use of -1 as an error value.
433 Other consumers of
441 format supports two different string tables which have an identifier of
443 This identifier is stored in the high-order bit of the unsigned four byte
445 Therefore, the maximum supported offset into one of these tables is 0x7ffffffff.
459 This encoded information tells us three different pieces of information:
462 The kind of the type
466 The length of the variable data
471 and 25 bits for the length of the variable data.
473 The current version of the file format defines 14 different kinds.
474 The interpretation of these different kinds will be discussed in the section
498 indirectly because they are part of some other structure.
503 a structure directly, but not one of its members which has a type.
534 against a single collection of source code.
553 uint32_t ctl_label; /* ref to name of label */
563 Generally, the names of all labels are found in the internal string
581 The object section provides a mapping from ELF symbols of type
598 any of the following conditions:
612 and the value of the symbol is zero.
622 The following sample code shows an example of iterating the object
629 * Given the start of the object section in a CTFv3 file, the number of symbols,
632 * implementation should ensure that they don't walk beyond the end of the CTF
669 The function section of the
671 file encodes the types of both the function's arguments and the function's
675 the function section encodes information for all symbols of type
678 Unlike with objects, because functions have a variable number of arguments, they
681 which is the size of a
686 Here, the variable length is turned into the number of arguments in the
690 type function, then the number of arguments is increased by one.
698 is encoded with the type identifier of the return type of the function.
699 It is followed by each of the type identifiers of the arguments, if any exist,
703 identifier of zero.
707 the function section is encoded in the order of the symbol table.
709 While iterating the symbol table, if any of the following conditions are true,
730 The type section is the heart of the
733 It encodes all of the information about the types themselves.
734 The base of the type information comes in two forms, a short form and a long
735 form, each of which may be followed by a variable number of arguments.
738 #define CTF_V3_MAX_SIZE 0xfffffffe /* max size of a type in bytes */
746 uint32_t _size; /* size of entire type in bytes */
758 uint32_t ctt_lsizehi; /* high 32 bits of type size in bytes */
759 uint32_t ctt_lsizelo; /* low 32 bits of type size in bytes */
770 to store the number of bytes.
771 If the number of bytes in a structure would exceed 0xfffffffe, then the
777 is set to value of
782 structure, but pay attention to the value of the member
784 to determine whether they should increment their scan by the size of
788 Not all kinds of types use
796 Therefore the first entry encountered has a type id of 0x1, or 0x8000 if a
802 The string that it points to is the name of the type.
803 If the identifier points to an empty string (one that consists solely of a null
815 The rest of this section will be broken down into the interpretation of the
817 .Ss Encoding of Integers
818 Integers, which are of type
824 All integers must be encoded with a variable length of zero.
827 member describes the length of the integer in bytes.
828 In general, integer sizes will be rounded up to the closest power of two.
830 The integer encoding contains three different pieces of information:
833 The encoding of the integer
867 is set, that indicates that the integer is of a type that stores character
883 indicates that the integer is used as part of a variable number of arguments.
885 .Ss Encoding of Floats
886 Floats, which are of type
890 which describes the kind of float that exists.
893 member is the size, in bytes, of the float.
894 The float encoding has three different pieces of information inside of it:
898 The specific kind of float that exists
919 Where as the encoding for integers is a series of flags, the encoding for
920 floats maps to a specific kind of float.
922 The kinds of floats correspond to both their size, and the encoding.
923 This covers all of the basic C intrinsic floating point types.
924 The following are the different kinds of floats represented in the encoding:
939 .Ss Encoding of Arrays
940 Arrays, which are of type
943 They are followed by a structure which describes the number of elements in the
944 array, the type identifier of the elements in the array, and the type identifier
945 of the index of the array.
952 uint32_t cta_contents; /* reference to type of array contents */
953 uint32_t cta_index; /* reference to type of array index */
954 uint32_t cta_nelems; /* number of elements */
962 members of the
968 is a simple four byte unsigned count of the number of elements.
970 .Ss Encoding of Functions
971 Function types, which are of type
973 use the variable length list to be the number of arguments in the function.
978 member is encoded with the type identifier of the return type of the function.
983 The variable argument list contains the type identifiers for the arguments of
990 If the function's last argument is of type varargs, then it is also written out,
992 This is included in the count of the function's arguments.
1003 .Ss Encoding of Structures and Unions
1009 The main difference between them is the fact that members of a structure
1011 They are also very similar in terms of their encoding in
1013 The variable length argument for structures and unions represents the number of
1015 The value of the member
1017 is the size of the structure and union.
1020 When the size of a structure or union is greater than or equal to the large
1027 uint32_t ctm_type; /* reference to type of member */
1028 uint32_t ctm_offset; /* offset of this member in bits */
1033 uint32_t ctlm_type; /* reference to type of member */
1034 uint32_t ctlm_offsethi; /* high 32 bits of member offset in bits */
1035 uint32_t ctlm_offsetlo; /* low 32 bits of member offset in bits */
1043 refer to the name of the member.
1051 both refer to the type of the member.
1055 The last piece of information that is present is the offset which describes the
1057 For unions, this value will always be zero because each member of a union has
1058 an offset of zero.
1064 larger than the size of the member.
1065 When the size of the overall structure is strictly less than 536870912 bytes,
1070 However, when the size of the structure is greater than or equal to 536870912
1071 bytes, then the number of bits is split into two 32-bit quantities.
1074 represents the upper 32 bits of the offset, while the other member,
1076 represents the lower 32 bits of the offset.
1080 to the left by thirty two and then doing a binary or of
1082 .Ss Encoding of Enumerations
1086 Enumerations use the variable list to note the number of values that the
1090 thus the value of the member
1092 is always the size of an integer which is determined based on the current model.
1100 regardless of the architecture.
1115 refers to the name of the enumerator's value, it is encoded according to the
1120 contains the integer value of this enumerator.
1121 .Ss Encoding of Forward References
1122 Forward references, types of kind
1133 The only member of the
1137 which points to the name of the forward reference in the string table as
1140 .Ss Encoding of Pointers, Typedefs, Volatile, Const, and Restrict
1144 In the case of typedefs, they provide an alternate name, while volatile, const,
1159 .Ss Encoding of Unknown Types
1173 The last section of the
1178 This section encodes all of the strings that appear throughout the other
1180 It is laid out as a series of characters followed by a null terminator.
1182 any characters to appear in identifiers outside of a subset of ASCII.
1183 However, any extended characters sets should be written out as a series of UTF-8
1192 Beyond the first byte in the section being the null terminator, the order of
1197 identify the architecture and endianness of the file.
1200 container inside such an object must match the endianness of the ELF object.
1201 Aside from the question of the endian encoding of data, there should be no other
1203 While many of the types in this document refer to non-fixed size C integral
1217 container inside of an ELF object, there are certain conventions that are
1218 expected for the purposes of tooling being able to find the
1231 The type of the section must be