Lines Matching full:elf
3 * tools/testing/selftests/kvm/lib/elf.c
11 #include <linux/elf.h>
20 /* Open the ELF file. */ in elfhdr_get()
23 TEST_ASSERT(fd >= 0, "Failed to open ELF file,\n" in elfhdr_get()
27 /* Read in and validate ELF Identification Record. in elfhdr_get()
28 * The ELF Identification record is the first 16 (EI_NIDENT) bytes in elfhdr_get()
29 * of the ELF header, which is at the beginning of the ELF file. in elfhdr_get()
32 * the real size of the ELF header. in elfhdr_get()
38 "ELF MAGIC Mismatch,\n" in elfhdr_get()
57 "cases where the host and ELF file endianness\n" in elfhdr_get()
69 "ELF version,\n" in elfhdr_get()
75 /* Read in the ELF header. in elfhdr_get()
76 * With the ELF Identification portion of the ELF header in elfhdr_get()
78 * as expected, it is now safe to read the entire ELF header. in elfhdr_get()
81 TEST_ASSERT(offset_rv == 0, "Seek to ELF header failed,\n" in elfhdr_get()
96 /* VM ELF Load
99 * filename - Path to ELF file
108 * Loads the program image of the ELF file specified by filename,
120 /* Open the ELF file. */ in kvm_vm_elf_load()
123 TEST_ASSERT(fd >= 0, "Failed to open ELF file,\n" in kvm_vm_elf_load()
127 /* Read in the ELF header. */ in kvm_vm_elf_load()
131 * The following ELF header members specify the location in kvm_vm_elf_load()
181 * the ELF file. in kvm_vm_elf_load()