Lines Matching defs:sec

387 	char *sec;
795 pr_warn("sec '%s': corrupted program '%s', offset %zu, size %zu\n",
845 pr_warn("sec '%s': failed to allocate memory for prog '%s'\n", sec_name, name);
879 pr_warn("sec '%s': failed to get symbol name for offset %zu\n",
885 pr_warn("sec '%s': program at offset %zu crosses section boundary\n",
891 pr_warn("sec '%s': program '%s' is static and not supported\n", sec_name, name);
895 pr_debug("sec '%s': found program '%s' at insn offset %zu (%zu bytes), code size %zu insns (%zu bytes)\n",
905 pr_warn("sec '%s': failed to alloc memory for new program '%s'\n",
2613 const struct btf_type *sec,
2626 vi = btf_var_secinfos(sec) + var_idx;
2715 const struct btf_type *sec = NULL;
2747 sec = t;
2753 if (!sec) {
2758 vlen = btf_vlen(sec);
2760 err = bpf_object__init_user_btf_map(obj, sec, i,
2972 const struct btf_ext_info_sec *sec;
2990 for_each_btf_ext_sec(seg, sec) {
2996 sec_name = btf__name_by_offset(obj->btf, sec->sec_name_off);
3067 pr_debug("sec '%s': failed to determine size from ELF: size %u, err %d\n",
3084 pr_debug("sec '%s': unexpected non-VAR type found\n", sec_name);
3094 pr_debug("sec '%s': failed to find name of DATASEC's member #%d\n",
3101 pr_debug("sec '%s': failed to find ELF symbol for VAR '%s'\n",
3676 /* ELF section indices are 0-based, but sec #0 is special "invalid"
3678 * include sec #0, it is already the necessary size of an array to keep
4112 const struct btf_type *sec;
4122 sec = btf__type_by_id(btf, sec_btf_id);
4123 vs = btf_var_secinfos(sec);
4124 for (i = 0; i < btf_vlen(sec); i++, vs++) {
4132 /* No func in ksyms sec. No need to add dummy var. */
4133 if (i == btf_vlen(sec))
4149 struct btf_type *sec, *kcfg_sec = NULL, *ksym_sec = NULL;
4227 sec = (void *)btf__type_by_id(obj->btf, ext->sec_btf_id);
4228 sec_name = btf__name_by_offset(obj->btf, sec->name_off);
4236 kcfg_sec = sec;
4257 ksym_sec = sec;
4299 sec = ksym_sec;
4300 n = btf_vlen(sec);
4302 struct btf_var_secinfo *vs = btf_var_secinfos(sec) + i;
4338 sec->size = off;
4342 sec = kcfg_sec;
4355 sec->size = off;
4356 n = btf_vlen(sec);
4358 struct btf_var_secinfo *vs = btf_var_secinfos(sec) + i;
4547 pr_debug("prog '%s': found map %zd (%s, sec %d, off %zu) for insn #%u\n",
4574 pr_debug("prog '%s': found data map %zd (%s, sec %d, off %zu) for insn %u\n",
4664 pr_debug("sec '%s': collecting relocation for section(%zu) '%s'\n",
4671 pr_warn("sec '%s': failed to get relo #%d\n", relo_sec_name, i);
4678 pr_warn("sec '%s': symbol #%zu not found for relo #%d\n",
4684 pr_warn("sec '%s': corrupted symbol #%zu pointing to invalid section #%zu for relo #%d\n",
4690 pr_warn("sec '%s': invalid offset 0x%zx for relo #%d\n",
4712 pr_debug("sec '%s': relo #%d: insn #%u against '%s'\n",
4717 pr_debug("sec '%s': relo #%d: couldn't find program in section '%s' for insn #%u, probably overridden weak function, skipping...\n",
6188 const struct btf_ext_info_sec *sec;
6221 for_each_btf_ext_sec(seg, sec) {
6225 sec_name = btf__name_by_offset(obj->btf, sec->sec_name_off);
6231 pr_debug("sec '%s': found %d CO-RE relocations\n", sec_name, sec->num_info);
6233 for_each_btf_ext_rec(seg, sec, i, rec) {
6247 pr_debug("sec '%s': skipping CO-RE relocation #%d for insn #%d belonging to eliminated weak subprogram\n",
6469 const struct btf_ext_info_sec *sec;
6474 for_each_btf_ext_sec(ext_info, sec) {
6480 for_each_btf_ext_rec(ext_info, sec, i, rec) {
7043 const struct btf_type *sec, *var, *def;
7056 sec = btf__type_by_id(obj->btf, obj->efile.btf_maps_sec_btf_id);
7057 if (!sec)
7085 vi = btf_var_secinfos(sec) + map->btf_var_idx;
9199 .sec = (char *)sec_pfx, \
9325 int libbpf_register_prog_handler(const char *sec,
9338 if (sec) {
9353 sec_def->sec = sec ? strdup(sec) : NULL;
9354 if (sec && !sec_def->sec)
9367 if (sec)
9397 free(custom_sec_defs[i].sec);
9416 size_t len = strlen(sec_def->sec);
9419 if (sec_def->sec[len - 1] == '/') {
9420 if (str_has_pfx(sec_name, sec_def->sec))
9428 if (sec_def->sec[len - 1] == '+') {
9431 if (strncmp(sec_name, sec_def->sec, len) != 0)
9439 return strcmp(sec_name, sec_def->sec) == 0;
9491 if (strlen(buf) + strlen(section_defs[i].sec) + 2 > len) {
9496 strcat(buf, section_defs[i].sec);
9687 pr_warn("struct_ops reloc %s: cannot use prog %s in sec %s with type %u attach_btf_id %u expected_attach_type %u for func ptr %s\n",