Lines Matching refs:elf
25 static int is_x86_64(const struct elf *elf) in is_x86_64() argument
27 switch (elf->ehdr.e_machine) { in is_x86_64()
33 WARN("unexpected ELF machine type %d", elf->ehdr.e_machine); in is_x86_64()
105 int arch_decode_instruction(const struct elf *elf, const struct section *sec, in arch_decode_instruction() argument
121 x86_64 = is_x86_64(elf); in arch_decode_instruction()
675 static int elf_add_alternative(struct elf *elf, in elf_add_alternative() argument
684 sec = find_section_by_name(elf, ".altinstructions"); in elf_add_alternative()
686 sec = elf_create_section(elf, ".altinstructions", in elf_add_alternative()
695 s = elf_getscn(elf->elf, sec->idx); in elf_add_alternative()
717 if (elf_add_reloc_to_insn(elf, sec, sec->sh.sh_size, in elf_add_alternative()
723 if (elf_add_reloc(elf, sec, sec->sh.sh_size + 4, in elf_add_alternative()
763 sym = find_symbol_by_name(file->elf, name); in arch_rewrite_retpolines()
765 sym = elf_create_undef_symbol(file->elf, name); in arch_rewrite_retpolines()
772 if (elf_add_alternative(file->elf, insn, sym, in arch_rewrite_retpolines()