On 11/6/19 9:46 PM, Alexei Starovoitov wrote: > @@ -3924,6 +3965,14 @@ __bpf_object__open(const char *path, const void *obj_buf, size_t obj_buf_sz, > bpf_program__set_type(prog, prog_type); > bpf_program__set_expected_attach_type(prog, attach_type); > if (prog_type == BPF_PROG_TYPE_TRACING) { > + if (attach_prog_fd) { > + err = libbpf_get_prog_btf_id(attach_prog_fd, prog->section_name + 6); > + if (err > 0) { > + btf_id = err; > + err = 0; > + prog->attach_prog_fd = attach_prog_fd; > + } > + } else > err = libbpf_attach_btf_id_by_name(prog->section_name, forgot to squash small cleanup here last night. pls ignore this particular patch.