elf_fd
int elf_open(const char *binary_path, struct elf_fd *elf_fd)
elf_fd->elf = NULL;
elf_fd->fd = -1;
struct elf_fd elf_fd;
ret = elf_open(binary_path, &elf_fd);
ret = elf_find_func_offset(elf_fd.elf, binary_path, name);
elf_close(&elf_fd);
struct elf_fd elf_fd;
err = elf_open(binary_path, &elf_fd);
err = elf_sym_iter_new(&iter, elf_fd.elf, binary_path, sh_types[i], st_type);
elf_fd->fd = fd;
elf_fd->elf = elf;
elf_close(&elf_fd);
struct elf_fd elf_fd;
err = elf_open(binary_path, &elf_fd);
err = elf_sym_iter_new(&iter, elf_fd.elf, binary_path, sh_types[i], STT_FUNC);
void elf_close(struct elf_fd *elf_fd)
if (!elf_fd)
elf_close(&elf_fd);
elf_end(elf_fd->elf);
close(elf_fd->fd);
int elf_open(const char *binary_path, struct elf_fd *elf_fd);
void elf_close(struct elf_fd *elf_fd);
struct elf_fd elf_fd;
err = elf_open(path, &elf_fd);
err = sanity_check_usdt_elf(elf_fd.elf, path);
err = collect_usdt_targets(man, &elf_fd, path, pid, usdt_provider, usdt_name,
elf_close(&elf_fd);
elf_close(&elf_fd);
static int collect_usdt_targets(struct usdt_manager *man, struct elf_fd *elf_fd, const char *path,
Elf *elf = elf_fd->elf;
if (man->has_uprobe_syscall && has_nop_combo(elf_fd->fd, usdt_rel_ip)) {