Lines Matching refs:shname
300 static int get_sec(Elf *elf, int i, GElf_Ehdr *ehdr, char **shname, in get_sec() argument
312 *shname = elf_strptr(elf, ehdr->e_shstrndx, shdr->sh_name); in get_sec()
313 if (!*shname || !shdr->sh_size) in get_sec()
499 char *shname, *shname_prog; in do_load_bpf_file() local
528 if (get_sec(elf, i, &ehdr, &shname, &shdr, &data)) in do_load_bpf_file()
533 i, shname, data->d_buf, data->d_size, in do_load_bpf_file()
536 if (strcmp(shname, "license") == 0) { in do_load_bpf_file()
539 } else if (strcmp(shname, "version") == 0) { in do_load_bpf_file()
547 } else if (strcmp(shname, "maps") == 0) { in do_load_bpf_file()
587 if (get_sec(elf, i, &ehdr, &shname, &shdr, &data)) in do_load_bpf_file()
617 if (get_sec(elf, i, &ehdr, &shname, &shdr, &data)) in do_load_bpf_file()
620 if (memcmp(shname, "kprobe/", 7) == 0 || in do_load_bpf_file()
621 memcmp(shname, "kretprobe/", 10) == 0 || in do_load_bpf_file()
622 memcmp(shname, "tracepoint/", 11) == 0 || in do_load_bpf_file()
623 memcmp(shname, "raw_tracepoint/", 15) == 0 || in do_load_bpf_file()
624 memcmp(shname, "xdp", 3) == 0 || in do_load_bpf_file()
625 memcmp(shname, "perf_event", 10) == 0 || in do_load_bpf_file()
626 memcmp(shname, "socket", 6) == 0 || in do_load_bpf_file()
627 memcmp(shname, "cgroup/", 7) == 0 || in do_load_bpf_file()
628 memcmp(shname, "sockops", 7) == 0 || in do_load_bpf_file()
629 memcmp(shname, "sk_skb", 6) == 0 || in do_load_bpf_file()
630 memcmp(shname, "sk_msg", 6) == 0) { in do_load_bpf_file()
631 ret = load_and_attach(shname, data->d_buf, in do_load_bpf_file()