Lines Matching refs:efile
196 } efile; member
205 #define obj_elf_valid(o) ((o)->efile.elf)
319 obj->efile.fd = -1; in bpf_object__new()
327 obj->efile.obj_buf = obj_buf; in bpf_object__new()
328 obj->efile.obj_buf_sz = obj_buf_sz; in bpf_object__new()
342 if (obj->efile.elf) { in bpf_object__elf_finish()
343 elf_end(obj->efile.elf); in bpf_object__elf_finish()
344 obj->efile.elf = NULL; in bpf_object__elf_finish()
346 obj->efile.symbols = NULL; in bpf_object__elf_finish()
348 zfree(&obj->efile.reloc); in bpf_object__elf_finish()
349 obj->efile.nr_reloc = 0; in bpf_object__elf_finish()
350 zclose(obj->efile.fd); in bpf_object__elf_finish()
351 obj->efile.obj_buf = NULL; in bpf_object__elf_finish()
352 obj->efile.obj_buf_sz = 0; in bpf_object__elf_finish()
365 if (obj->efile.obj_buf_sz > 0) { in bpf_object__elf_init()
370 obj->efile.elf = elf_memory(obj->efile.obj_buf, in bpf_object__elf_init()
371 obj->efile.obj_buf_sz); in bpf_object__elf_init()
373 obj->efile.fd = open(obj->path, O_RDONLY); in bpf_object__elf_init()
374 if (obj->efile.fd < 0) { in bpf_object__elf_init()
380 obj->efile.elf = elf_begin(obj->efile.fd, in bpf_object__elf_init()
385 if (!obj->efile.elf) { in bpf_object__elf_init()
392 if (!gelf_getehdr(obj->efile.elf, &obj->efile.ehdr)) { in bpf_object__elf_init()
398 ep = &obj->efile.ehdr; in bpf_object__elf_init()
418 switch (obj->efile.ehdr.e_ident[EI_DATA]) { in bpf_object__check_endianness()
492 Elf *elf = obj->efile.elf; in bpf_object__elf_collect()
493 GElf_Ehdr *ep = &obj->efile.ehdr; in bpf_object__elf_collect()
549 if (obj->efile.symbols) { in bpf_object__elf_collect()
554 obj->efile.symbols = data; in bpf_object__elf_collect()
568 void *reloc = obj->efile.reloc; in bpf_object__elf_collect()
569 int nr_reloc = obj->efile.nr_reloc + 1; in bpf_object__elf_collect()
572 sizeof(*obj->efile.reloc) * nr_reloc); in bpf_object__elf_collect()
579 obj->efile.reloc = reloc; in bpf_object__elf_collect()
580 obj->efile.nr_reloc = nr_reloc; in bpf_object__elf_collect()
582 obj->efile.reloc[n].shdr = sh; in bpf_object__elf_collect()
583 obj->efile.reloc[n].data = data; in bpf_object__elf_collect()
782 for (i = 0; i < obj->efile.nr_reloc; i++) { in bpf_object__collect_reloc()
783 GElf_Shdr *shdr = &obj->efile.reloc[i].shdr; in bpf_object__collect_reloc()
784 Elf_Data *data = obj->efile.reloc[i].data; in bpf_object__collect_reloc()
804 obj->efile.symbols); in bpf_object__collect_reloc()