Lines Matching defs:offset
107 /* logical string offset of this BTF instance:
389 m->offset = bswap_32(m->offset);
404 v->offset = bswap_32(v->offset);
461 pr_warn("btf: type [%u]: invalid %s (string offset %u)\n", type_id, what, str_off);
855 /* if field offset isn't aligned according to field
859 (m->offset % (8 * align)) != 0)
1000 /* +1 for empty string at offset 0 */
1015 btf->hdr->str_len = base_btf ? 0 : 1; /* empty string at offset 0 */
1589 const char *btf__str_by_offset(const struct btf *btf, __u32 offset)
1591 if (offset < btf->start_str_off)
1592 return btf__str_by_offset(btf->base_btf, offset);
1593 else if (offset - btf->start_str_off < btf->hdr->str_len)
1594 return btf_strs_data(btf) + (offset - btf->start_str_off);
1599 const char *btf__name_by_offset(const struct btf *btf, __u32 offset)
1601 return btf__str_by_offset(btf, offset);
1748 /* Find an offset in BTF string section that corresponds to a given string *s*.
1750 * - >0 offset into string section, if string is found;
1777 * - > 0 offset into string section, on success;
1900 * btf->start_id + btf->nr_types - 1 is the type ID offset we should
1938 /* pre-allocate enough memory for type offset index for new types */
1959 /* fill out type ID to type offset mapping for lookups by type ID */
1972 /* go to next type data and type offset index entry */
2053 /* set INT info, we don't allow setting legacy bit offset/size */
2265 * - *bit_offset* - bit offset of the start of the field within struct/union;
2288 /* best-effort bit field offset/size enforcement */
2293 /* only offset 0 is allowed for unions */
2314 m->offset = bit_offset | (bit_size << 24);
2822 * - *offset* - variable offset within data section, in bytes;
2829 int btf__add_datasec_var_info(struct btf *btf, int var_type_id, __u32 offset, __u32 byte_sz)
2855 v->offset = offset;
3776 h = hash_combine(h, member->offset);
3801 if (m1->name_off != m2->name_off || m1->offset != m2->offset)