Lines Matching refs:shname

316 static int get_sec(Elf *elf, int i, GElf_Ehdr *ehdr, char **shname,  in get_sec()  argument
328 *shname = elf_strptr(elf, ehdr->e_shstrndx, shdr->sh_name); in get_sec()
329 if (!*shname || !shdr->sh_size) in get_sec()
515 char *shname, *shname_prog; in do_load_bpf_file() local
544 if (get_sec(elf, i, &ehdr, &shname, &shdr, &data)) in do_load_bpf_file()
549 i, shname, data->d_buf, data->d_size, in do_load_bpf_file()
552 if (strcmp(shname, "license") == 0) { in do_load_bpf_file()
555 } else if (strcmp(shname, "version") == 0) { in do_load_bpf_file()
563 } else if (strcmp(shname, "maps") == 0) { in do_load_bpf_file()
603 if (get_sec(elf, i, &ehdr, &shname, &shdr, &data)) in do_load_bpf_file()
633 if (get_sec(elf, i, &ehdr, &shname, &shdr, &data)) in do_load_bpf_file()
636 if (memcmp(shname, "kprobe/", 7) == 0 || in do_load_bpf_file()
637 memcmp(shname, "kretprobe/", 10) == 0 || in do_load_bpf_file()
638 memcmp(shname, "tracepoint/", 11) == 0 || in do_load_bpf_file()
639 memcmp(shname, "raw_tracepoint/", 15) == 0 || in do_load_bpf_file()
640 memcmp(shname, "xdp", 3) == 0 || in do_load_bpf_file()
641 memcmp(shname, "perf_event", 10) == 0 || in do_load_bpf_file()
642 memcmp(shname, "socket", 6) == 0 || in do_load_bpf_file()
643 memcmp(shname, "cgroup/", 7) == 0 || in do_load_bpf_file()
644 memcmp(shname, "sockops", 7) == 0 || in do_load_bpf_file()
645 memcmp(shname, "sk_skb", 6) == 0 || in do_load_bpf_file()
646 memcmp(shname, "sk_msg", 6) == 0) { in do_load_bpf_file()
647 ret = load_and_attach(shname, data->d_buf, in do_load_bpf_file()