Lines Matching defs:sec
376 char *sec;
753 pr_warn("sec '%s': corrupted program '%s', offset %zu, size %zu\n",
802 pr_warn("sec '%s': failed to allocate memory for prog '%s'\n", sec_name, name);
836 pr_warn("sec '%s': failed to get symbol name for offset %zu\n",
842 pr_warn("sec '%s': program at offset %zu crosses section boundary\n",
848 pr_warn("sec '%s': program '%s' is static and not supported\n", sec_name, name);
852 pr_debug("sec '%s': found program '%s' at insn offset %zu (%zu bytes), code size %zu insns (%zu bytes)\n",
862 pr_warn("sec '%s': failed to alloc memory for new program '%s'\n",
2516 const struct btf_type *sec,
2529 vi = btf_var_secinfos(sec) + var_idx;
2618 const struct btf_type *sec = NULL;
2643 sec = t;
2649 if (!sec) {
2654 vlen = btf_vlen(sec);
2656 err = bpf_object__init_user_btf_map(obj, sec, i,
2864 const struct btf_ext_info_sec *sec;
2878 for_each_btf_ext_sec(seg, sec) {
2884 sec_name = btf__name_by_offset(obj->btf, sec->sec_name_off);
2945 pr_debug("sec '%s': failed to determine size from ELF: size %u, err %d\n",
2962 pr_debug("sec '%s': unexpected non-VAR type found\n", sec_name);
2972 pr_debug("sec '%s': failed to find name of DATASEC's member #%d\n",
2979 pr_debug("sec '%s': failed to find ELF symbol for VAR '%s'\n",
3398 /* ELF section indices are 0-based, but sec #0 is special "invalid"
3400 * include sec #0, it is already the necessary size of an array to keep
3737 const struct btf_type *sec;
3747 sec = btf__type_by_id(btf, sec_btf_id);
3748 vs = btf_var_secinfos(sec);
3749 for (i = 0; i < btf_vlen(sec); i++, vs++) {
3757 /* No func in ksyms sec. No need to add dummy var. */
3758 if (i == btf_vlen(sec))
3774 struct btf_type *sec, *kcfg_sec = NULL, *ksym_sec = NULL;
3843 sec = (void *)btf__type_by_id(obj->btf, ext->sec_btf_id);
3844 sec_name = btf__name_by_offset(obj->btf, sec->name_off);
3852 kcfg_sec = sec;
3873 ksym_sec = sec;
3915 sec = ksym_sec;
3916 n = btf_vlen(sec);
3918 struct btf_var_secinfo *vs = btf_var_secinfos(sec) + i;
3954 sec->size = off;
3958 sec = kcfg_sec;
3971 sec->size = off;
3972 n = btf_vlen(sec);
3974 struct btf_var_secinfo *vs = btf_var_secinfos(sec) + i;
4156 pr_debug("prog '%s': found map %zd (%s, sec %d, off %zu) for insn #%u\n",
4183 pr_debug("prog '%s': found data map %zd (%s, sec %d, off %zu) for insn %u\n",
4263 pr_debug("sec '%s': collecting relocation for section(%zu) '%s'\n",
4270 pr_warn("sec '%s': failed to get relo #%d\n", relo_sec_name, i);
4277 pr_warn("sec '%s': symbol #%zu not found for relo #%d\n",
4283 pr_warn("sec '%s': corrupted symbol #%zu pointing to invalid section #%zu for relo #%d\n",
4289 pr_warn("sec '%s': invalid offset 0x%zx for relo #%d\n",
4307 pr_debug("sec '%s': relo #%d: insn #%u against '%s'\n",
4312 pr_debug("sec '%s': relo #%d: couldn't find program in section '%s' for insn #%u, probably overridden weak function, skipping...\n",
5785 const struct btf_ext_info_sec *sec;
5816 for_each_btf_ext_sec(seg, sec) {
5820 sec_name = btf__name_by_offset(obj->btf, sec->sec_name_off);
5826 pr_debug("sec '%s': found %d CO-RE relocations\n", sec_name, sec->num_info);
5828 for_each_btf_ext_rec(seg, sec, i, rec) {
5842 pr_debug("sec '%s': skipping CO-RE relocation #%d for insn #%d belonging to eliminated weak subprogram\n",
6064 const struct btf_ext_info_sec *sec;
6069 for_each_btf_ext_sec(ext_info, sec) {
6075 for_each_btf_ext_rec(ext_info, sec, i, rec) {
6605 const struct btf_type *sec, *var, *def;
6618 sec = btf__type_by_id(obj->btf, obj->efile.btf_maps_sec_btf_id);
6619 if (!sec)
6647 vi = btf_var_secinfos(sec) + map->btf_var_idx;
8754 .sec = (char *)sec_pfx, \
8869 int libbpf_register_prog_handler(const char *sec,
8882 if (sec) {
8897 sec_def->sec = sec ? strdup(sec) : NULL;
8898 if (sec && !sec_def->sec)
8911 if (sec)
8941 free(custom_sec_defs[i].sec);
8960 size_t len = strlen(sec_def->sec);
8963 if (sec_def->sec[len - 1] == '/') {
8964 if (str_has_pfx(sec_name, sec_def->sec))
8972 if (sec_def->sec[len - 1] == '+') {
8975 if (strncmp(sec_name, sec_def->sec, len) != 0)
8983 return strcmp(sec_name, sec_def->sec) == 0;
9035 if (strlen(buf) + strlen(section_defs[i].sec) + 2 > len) {
9040 strcat(buf, section_defs[i].sec);
9231 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",