Lines Matching full:elf

4  * resolve_btfids scans ELF object for .BTF_ids section and resolves
121 Elf *elf; member
290 /* Older libelf.h and glibc elf.h might not yet define the ELF compression types. */
305 static int compressed_section_fix(Elf *elf, Elf_Scn *scn, GElf_Shdr *sh) in compressed_section_fix() argument
307 int expected = gelf_getclass(elf) == ELFCLASS32 ? 4 : 8; in compressed_section_fix()
334 Elf *elf; in elf_collect() local
346 elf = elf_begin(fd, ELF_C_RDWR_MMAP, NULL); in elf_collect()
347 if (!elf) { in elf_collect()
349 pr_err("FAILED cannot create ELF descriptor: %s\n", in elf_collect()
355 obj->efile.elf = elf; in elf_collect()
357 elf_flagelf(elf, ELF_C_SET, ELF_F_LAYOUT); in elf_collect()
359 if (elf_getshdrstrndx(elf, &shdrstrndx) != 0) { in elf_collect()
364 if (gelf_getehdr(obj->efile.elf, &ehdr) == NULL) { in elf_collect()
365 pr_err("FAILED cannot get ELF header: %s\n", in elf_collect()
372 * Scan all the elf sections and look for save data in elf_collect()
375 while ((scn = elf_nextscn(elf, scn)) != NULL) { in elf_collect()
386 name = elf_strptr(elf, shdrstrndx, sh.sh_name); in elf_collect()
422 if (compressed_section_fix(elf, scn, &sh)) in elf_collect()
436 scn = elf_getscn(obj->efile.elf, obj->efile.symbols_shndx); in symbols_collect()
460 name = elf_strptr(obj->efile.elf, obj->efile.strtabidx, in symbols_collect()
711 * When ELF endianness does not match endianness of the in sets_patch()
713 * the ELF. This, however, corrupts SET8 flags which are in sets_patch()
756 err = elf_update(obj->efile.elf, ELF_C_WRITE); in symbols_patch()
768 "resolve_btfids [<options>] <ELF object>",
828 if (obj.efile.elf) { in main()
829 elf_end(obj.efile.elf); in main()