Lines Matching full:elf

4  * resolve_btfids scans ELF object for .BTF_ids section and resolves
121 Elf *elf; member
291 /* Older libelf.h and glibc elf.h might not yet define the ELF compression types. */
306 static int compressed_section_fix(Elf *elf, Elf_Scn *scn, GElf_Shdr *sh) in compressed_section_fix() argument
308 int expected = gelf_getclass(elf) == ELFCLASS32 ? 4 : 8; in compressed_section_fix()
335 Elf *elf; in elf_collect() local
347 elf = elf_begin(fd, ELF_C_RDWR_MMAP, NULL); in elf_collect()
348 if (!elf) { in elf_collect()
350 pr_err("FAILED cannot create ELF descriptor: %s\n", in elf_collect()
356 obj->efile.elf = elf; in elf_collect()
358 elf_flagelf(elf, ELF_C_SET, ELF_F_LAYOUT); in elf_collect()
360 if (elf_getshdrstrndx(elf, &shdrstrndx) != 0) { in elf_collect()
365 if (gelf_getehdr(obj->efile.elf, &ehdr) == NULL) { in elf_collect()
366 pr_err("FAILED cannot get ELF header: %s\n", in elf_collect()
373 * Scan all the elf sections and look for save data in elf_collect()
376 while ((scn = elf_nextscn(elf, scn)) != NULL) { in elf_collect()
387 name = elf_strptr(elf, shdrstrndx, sh.sh_name); in elf_collect()
423 if (compressed_section_fix(elf, scn, &sh)) in elf_collect()
437 scn = elf_getscn(obj->efile.elf, obj->efile.symbols_shndx); in symbols_collect()
461 name = elf_strptr(obj->efile.elf, obj->efile.strtabidx, in symbols_collect()
715 * When ELF endianness does not match endianness of the in sets_patch()
717 * the ELF. This, however, corrupts SET8 flags which are in sets_patch()
760 err = elf_update(obj->efile.elf, ELF_C_WRITE); in symbols_patch()
772 "resolve_btfids [<options>] <ELF object>",
836 if (obj.efile.elf) { in main()
837 elf_end(obj.efile.elf); in main()