| /linux/arch/s390/kernel/ |
| H A D | kexec_elf.c | 20 const Elf_Ehdr *ehdr; in kexec_file_add_kernel_elf() local 27 ehdr = (Elf_Ehdr *)kernel; in kexec_file_add_kernel_elf() 32 entry = ehdr->e_entry; in kexec_file_add_kernel_elf() 34 phdr = (void *)ehdr + ehdr->e_phoff; in kexec_file_add_kernel_elf() 35 for (i = 0; i < ehdr->e_phnum; i++, phdr++) { in kexec_file_add_kernel_elf() 73 const Elf_Ehdr *ehdr; in s390_elf_load() local 79 ehdr = (Elf_Ehdr *)kernel; in s390_elf_load() 81 if (ehdr->e_type != ET_EXEC || in s390_elf_load() 82 ehdr->e_ident[EI_CLASS] != ELFCLASS64 || in s390_elf_load() 83 !elf_check_arch(ehdr)) in s390_elf_load() [all …]
|
| /linux/arch/mips/boot/tools/ |
| H A D | relocs.c | 14 static Elf_Ehdr ehdr; variable 97 sec_strtab = secs[ehdr.e_shstrndx].strtab; in sec_name() 98 if (shndx < ehdr.e_shnum) in sec_name() 113 for (i = 0; i < ehdr.e_shnum; i++) in sec_lookup() 164 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) in elf16_to_cpu() 172 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) in elf32_to_cpu() 180 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) in cpu_to_elf32() 192 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) in elf64_to_cpu() 208 if (fread(&ehdr, sizeof(ehdr), 1, fp) != 1) in read_ehdr() 211 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) in read_ehdr() [all …]
|
| /linux/scripts/ |
| H A D | recordmcount.h | 211 static unsigned int get_shnum(Elf_Ehdr const *ehdr, Elf_Shdr const *shdr0) in get_shnum() argument 213 if (shdr0 && !ehdr->e_shnum) in get_shnum() 216 return w2(ehdr->e_shnum); in get_shnum() 219 static void set_shnum(Elf_Ehdr *ehdr, Elf_Shdr *shdr0, unsigned int new_shnum) in set_shnum() argument 222 ehdr->e_shnum = 0; in set_shnum() 225 ehdr->e_shnum = w2(new_shnum); in set_shnum() 228 static int get_shstrndx(Elf_Ehdr const *ehdr, Elf_Shdr const *shdr0) in get_shstrndx() argument 230 if (ehdr->e_shstrndx != SHN_XINDEX) in get_shstrndx() 231 return w2(ehdr->e_shstrndx); in get_shstrndx() 236 static void find_symtab(Elf_Ehdr *const ehdr, Elf_Shdr const *shdr0, in find_symtab() argument [all …]
|
| H A D | tracepoint-update.c | 34 Elf_Ehdr *ehdr; member 74 #define for_each_shdr_str(len, ehdr, sec) \ argument 75 for (const char *str = (void *)(ehdr) + shdr_offset(sec), \ 83 Elf_Ehdr *ehdr = etrace->ehdr; in make_trace_array() local 95 for_each_shdr_str(len, ehdr, check_data_sec) { in make_trace_array() 119 Elf_Ehdr *ehdr = etrace->ehdr; in check_tracepoints() local 130 for_each_shdr_str(len, ehdr, tracepoint_data_sec) { in check_tracepoints() 156 Elf_Ehdr *ehdr = addr; in process_tracepoints() local 166 shdr_start = (Elf_Shdr *)((char *)ehdr + ehdr_shoff(ehdr)); in process_tracepoints() 167 shentsize = ehdr_shentsize(ehdr); in process_tracepoints() [all …]
|
| H A D | elf-parse.c | 63 Elf_Ehdr *ehdr = addr; in elf_parse() 66 if (memcmp(ELFMAG, ehdr->e32.e_ident, SELFMAG) != 0 || in elf_parse() 67 ehdr->e32.e_ident[EI_VERSION] != EV_CURRENT) { in elf_parse() 72 switch (ehdr->e32.e_ident[EI_DATA]) { in elf_parse() 89 ehdr->e32.e_ident[EI_DATA], fname); in elf_parse() 93 type = elf_parser.r2(&ehdr->e32.e_type); in elf_parse() 99 switch (ehdr->e32.e_ident[EI_CLASS]) { in elf_parse() 123 if (elf_parser.r2(&ehdr->e32.e_ehsize) != sizeof(Elf32_Ehdr) || in elf_parse() 124 elf_parser.r2(&ehdr->e32.e_shentsize) != sizeof(Elf32_Shdr)) { in elf_parse() 155 if (elf_parser.r2(&ehdr in elf_parse() 57 Elf_Ehdr *ehdr = addr; elf_parse() local 165 Elf_Ehdr *ehdr = addr; elf_map_machine() local 172 Elf_Ehdr *ehdr = addr; elf_map_long_size() local [all...] |
| H A D | sorttable.c | 366 Elf_Ehdr *ehdr; in fill_relocs() 373 static int fill_relocs(void *ptr, uint64_t size, Elf_Ehdr *ehdr, uint64_t start_loc) in fill_relocs() 382 shdr_start = (Elf_Shdr *)((char *)ehdr + ehdr_shoff(ehdr)); in fill_relocs() 383 shentsize = ehdr_shentsize(ehdr); in fill_relocs() 385 shnum = ehdr_shnum(ehdr); in fill_relocs() 396 rel = (void *)ehdr + shdr_offset(shdr); in fill_relocs() 430 static void replace_relocs(void *ptr, uint64_t size, Elf_Ehdr *ehdr, uint64_t start_loc) in replace_relocs() 437 shdr_start = (Elf_Shdr *)((char *)ehdr + ehdr_shoff(ehdr)); in replace_relocs() 353 Elf_Ehdr *ehdr; global() member 360 fill_relocs(void * ptr,uint64_t size,Elf_Ehdr * ehdr,uint64_t start_loc) fill_relocs() argument 417 replace_relocs(void * ptr,uint64_t size,Elf_Ehdr * ehdr,uint64_t start_loc) replace_relocs() argument 489 Elf_Ehdr *ehdr = emloc->ehdr; sort_mcount_loc() local 590 do_sort(Elf_Ehdr * ehdr,char const * const fname,table_sort_t custom_sort) do_sort() argument 890 Elf_Ehdr *ehdr = addr; do_file() local [all...] |
| H A D | elf-parse.h | 32 uint64_t (*ehdr_shoff)(Elf_Ehdr *ehdr); 33 uint16_t (*ehdr_shstrndx)(Elf_Ehdr *ehdr); 34 uint16_t (*ehdr_shentsize)(Elf_Ehdr *ehdr); 35 uint16_t (*ehdr_shnum)(Elf_Ehdr *ehdr); 62 static inline uint64_t ehdr64_shoff(Elf_Ehdr *ehdr) in ehdr64_shoff() 64 return elf_parser.r8(&ehdr->e64.e_shoff); 67 static inline uint64_t ehdr32_shoff(Elf_Ehdr *ehdr) in ehdr32_shoff() 69 return elf_parser.r(&ehdr->e32.e_shoff); 72 static inline uint64_t ehdr_shoff(Elf_Ehdr *ehdr) in ehdr_shoff() 74 return elf_parser.ehdr_shoff(ehdr); 60 ehdr64_shoff(Elf_Ehdr * ehdr) ehdr64_shoff() argument 65 ehdr32_shoff(Elf_Ehdr * ehdr) ehdr32_shoff() argument 70 ehdr_shoff(Elf_Ehdr * ehdr) ehdr_shoff() argument [all...] |
| H A D | recordmcount.c | 514 Elf32_Ehdr *ehdr; in do_file() local 517 ehdr = mmap_file(fname); in do_file() 518 if (!ehdr) in do_file() 524 switch (ehdr->e_ident[EI_DATA]) { in do_file() 528 ehdr->e_ident[EI_DATA], fname); in do_file() 557 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 || in do_file() 558 w2(ehdr->e_type) != ET_REL || in do_file() 559 ehdr->e_ident[EI_VERSION] != EV_CURRENT) { in do_file() 565 switch (w2(ehdr->e_machine)) { in do_file() 568 w2(ehdr->e_machine), fname); in do_file() [all …]
|
| /linux/drivers/remoteproc/ |
| H A D | remoteproc_coredump.c | 239 void *ehdr; in rproc_coredump() local 275 ehdr = data; in rproc_coredump() 277 memset(ehdr, 0, elf_size_of_hdr(class)); in rproc_coredump() 279 elf_hdr_init_ident(ehdr, class); in rproc_coredump() 281 elf_hdr_set_e_type(class, ehdr, ET_CORE); in rproc_coredump() 282 elf_hdr_set_e_machine(class, ehdr, rproc->elf_machine); in rproc_coredump() 283 elf_hdr_set_e_version(class, ehdr, EV_CURRENT); in rproc_coredump() 284 elf_hdr_set_e_entry(class, ehdr, rproc->bootaddr); in rproc_coredump() 285 elf_hdr_set_e_phoff(class, ehdr, elf_size_of_hdr(class)); in rproc_coredump() 286 elf_hdr_set_e_ehsize(class, ehdr, elf_size_of_hdr(class)); in rproc_coredump() [all …]
|
| H A D | remoteproc_elf_loader.c | 46 struct elf32_hdr *ehdr; local 63 ehdr = (struct elf32_hdr *)fw->data; 65 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG)) { 70 class = ehdr->e_ident[EI_CLASS]; 83 if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB) { 85 if (ehdr->e_ident[EI_DATA] != ELFDATA2MSB) { 182 const void *ehdr, *phdr; 189 ehdr = elf_data; 190 phnum = elf_hdr_get_e_phnum(class, ehdr); 191 phdr = elf_data + elf_hdr_get_e_phoff(class, ehdr); 163 const void *ehdr, *phdr; global() local 257 const void *ehdr = elf_data; global() local [all...] |
| /linux/arch/alpha/boot/compressed/ |
| H A D | misc.c | 141 Elf64_Ehdr ehdr; in relocate_and_jump() local 145 memcpy(&ehdr, image, sizeof(ehdr)); in relocate_and_jump() 147 if (ehdr.e_ident[EI_MAG0] != ELFMAG0 || in relocate_and_jump() 148 ehdr.e_ident[EI_MAG1] != ELFMAG1 || in relocate_and_jump() 149 ehdr.e_ident[EI_MAG2] != ELFMAG2 || in relocate_and_jump() 150 ehdr.e_ident[EI_MAG3] != ELFMAG3 || in relocate_and_jump() 151 ehdr.e_ident[EI_CLASS] != ELFCLASS64 || in relocate_and_jump() 152 ehdr.e_ident[EI_DATA] != ELFDATA2LSB || in relocate_and_jump() 153 ehdr.e_machine != EM_ALPHA || in relocate_and_jump() 154 ehdr.e_type != ET_EXEC || in relocate_and_jump() [all …]
|
| /linux/drivers/s390/crypto/ |
| H A D | zcrypt_error.h | 83 struct error_hdr *ehdr = reply->msg; in convert_error() local 89 switch (ehdr->reply_code) { in convert_error() 105 if (ehdr->reply_code == REP82_ERROR_FILTERED_BY_HYPERVISOR && in convert_error() 106 ehdr->type == TYPE86_RSP_CODE) { in convert_error() 109 ehdr->reply_code, t86hdr->fmt2.apfs); in convert_error() 112 __func__, card, queue, ehdr->reply_code); in convert_error() 123 if (ehdr->reply_code == REP82_ERROR_TRANSPORT_FAIL && in convert_error() 124 ehdr->type == TYPE86_RSP_CODE) { in convert_error() 127 __func__, card, queue, ehdr->reply_code, in convert_error() 132 ehdr->reply_code); in convert_error() [all …]
|
| /linux/tools/testing/selftests/drivers/net/ |
| H A D | ring_reconfig.py | 35 ehdr = {'header':{'dev-index': cfg.ifindex}} 36 chans = cfg.eth.channels_get(ehdr) 50 defer(cfg.eth.channels_set, ehdr | restore) 54 cfg.eth.channels_set(ehdr | config) 55 get = cfg.eth.channels_get(ehdr) 90 ehdr = {'header':{'dev-index': cfg.ifindex}} 91 chans = cfg.eth.channels_get(ehdr) 110 cfg.eth.channels_set(ehdr | config) 111 defer(cfg.eth.channels_set, ehdr | restore) 119 ehdr 295 _set_small_tx_ring(cfg, ehdr) global() argument [all...] |
| /linux/tools/perf/util/ |
| H A D | symbol-elf.c | 57 GElf_Ehdr *ehdr; in elf_getphdrnum() local 59 ehdr = gelf_getehdr(elf, &gehdr); in elf_getphdrnum() 60 if (!ehdr) in elf_getphdrnum() 63 *dst = ehdr->e_phnum; in elf_getphdrnum() 216 GElf_Ehdr ehdr; in filename__has_section() local 228 if (gelf_getehdr(elf, &ehdr) == NULL) in filename__has_section() 231 found = !!elf_section_by_name(elf, &ehdr, &shdr, sec, NULL) && in filename__has_section() 330 static bool addend_may_be_ifunc(GElf_Ehdr *ehdr, struct rel_info *ri) in addend_may_be_ifunc() 332 return ehdr->e_machine == EM_X86_64 && ri->is_rela && in addend_may_be_ifunc() 336 static bool get_ifunc_name(Elf *elf, struct dso *dso, GElf_Ehdr *ehdr, in get_ifunc_name() 329 addend_may_be_ifunc(GElf_Ehdr * ehdr,struct rel_info * ri) addend_may_be_ifunc() argument 335 get_ifunc_name(Elf * elf,struct dso * dso,GElf_Ehdr * ehdr,struct rel_info * ri,char * buf,size_t buf_sz) get_ifunc_name() argument 366 get_plt_sizes(struct dso * dso,GElf_Ehdr * ehdr,GElf_Shdr * shdr_plt,u64 * plt_header_size,u64 * plt_entry_size) get_plt_sizes() argument 471 get_rela_dyn_info(Elf * elf,GElf_Ehdr * ehdr,struct rela_dyn_info * di,Elf_Scn * scn) get_rela_dyn_info() argument 566 dso__synthesize_plt_got_symbols(struct dso * dso,Elf * elf,GElf_Ehdr * ehdr,char * buf,size_t buf_sz) dso__synthesize_plt_got_symbols() argument 614 GElf_Ehdr ehdr; dso__synthesize_plt_symbols() local 787 GElf_Ehdr ehdr; elf_read_build_id() local 989 GElf_Ehdr ehdr; filename__read_debuglink() local 1057 elf__needs_adjust_symbols(GElf_Ehdr ehdr) elf__needs_adjust_symbols() argument 1071 GElf_Ehdr ehdr; read_gnu_debugdata() local 1146 GElf_Ehdr ehdr; symsrc__init() local 1271 max_text_section(Elf * elf,GElf_Ehdr * ehdr) max_text_section() argument 1480 GElf_Ehdr ehdr; dso__load_sym_internal() local 1864 GElf_Ehdr ehdr; dso__type_fd() local 1939 GElf_Ehdr ehdr; global() member 1944 GElf_Ehdr *ehdr; kcore__open() local 2010 GElf_Ehdr *ehdr = &to->ehdr; kcore__copy_hdr() local 2680 GElf_Ehdr ehdr; populate_sdt_note() local 2809 GElf_Ehdr ehdr; construct_sdt_notes_list() local [all...] |
| /linux/arch/arm64/kernel/pi/ |
| H A D | relacheck.c | 24 static Elf64_Ehdr *ehdr; variable 66 ehdr = mmap(0, stat.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in main() 67 if (ehdr == MAP_FAILED) { in main() 72 swap = ehdr->e_ident[EI_DATA] != HOST_ORDER; in main() 73 shdr = (void *)ehdr + swab_elfxword(ehdr->e_shoff); in main() 74 strtab = (void *)ehdr + in main() 75 swab_elfxword(shdr[swab_elfhword(ehdr->e_shstrndx)].sh_offset); in main() 77 for (int i = 0; i < swab_elfhword(ehdr->e_shnum); i++) { in main() 105 rela = (void *)ehdr + swab_elfxword(shdr[i].sh_offset); in main()
|
| /linux/drivers/net/wireless/morsemicro/mm81x/ |
| H A D | fw.c | 28 static int mm81x_fw_get_header(const u8 *data, Elf32_Ehdr *ehdr) in mm81x_fw_get_header() argument 43 ehdr->e_phoff = le32_to_cpu(p->e_phoff); in mm81x_fw_get_header() 44 ehdr->e_phentsize = le16_to_cpu(p->e_phentsize); in mm81x_fw_get_header() 45 ehdr->e_phnum = le16_to_cpu(p->e_phnum); in mm81x_fw_get_header() 46 ehdr->e_shoff = le32_to_cpu(p->e_shoff); in mm81x_fw_get_header() 47 ehdr->e_shentsize = le16_to_cpu(p->e_shentsize); in mm81x_fw_get_header() 48 ehdr->e_shnum = le16_to_cpu(p->e_shnum); in mm81x_fw_get_header() 49 ehdr->e_shstrndx = le16_to_cpu(p->e_shstrndx); in mm81x_fw_get_header() 50 ehdr->e_entry = le32_to_cpu(p->e_entry); in mm81x_fw_get_header() 75 static int mm81x_fw_get_section_header(const u8 *data, Elf32_Ehdr *ehdr, in mm81x_fw_get_section_header() argument 106 Elf32_Ehdr ehdr; mm81x_fw_load_fw() local 214 Elf32_Ehdr ehdr; mm81x_fw_load_bcf() local [all...] |
| /linux/lib/ |
| H A D | buildid.c | 212 const Elf32_Ehdr *ehdr; in get_build_id_32() 216 ehdr = freader_fetch(r, 0, sizeof(Elf32_Ehdr)); in get_build_id_32() 217 if (!ehdr) in get_build_id_32() 221 phnum = READ_ONCE(ehdr->e_phnum); in get_build_id_32() 222 phoff = READ_ONCE(ehdr->e_phoff); in get_build_id_32() 248 const Elf64_Ehdr *ehdr; in get_build_id_64() 253 ehdr = freader_fetch(r, 0, sizeof(Elf64_Ehdr)); in get_build_id_64() 254 if (!ehdr) in get_build_id_64() 258 phnum = READ_ONCE(ehdr->e_phnum); in get_build_id_64() 259 phoff = READ_ONCE(ehdr in get_build_id_64() 208 const Elf32_Ehdr *ehdr; get_build_id_32() local 244 const Elf64_Ehdr *ehdr; get_build_id_64() local 285 const Elf32_Ehdr *ehdr; __build_id_parse() local [all...] |
| /linux/arch/mips/vdso/ |
| H A D | genvdso.h | 9 const ELF(Ehdr) *ehdr = vdso; in FUNC() 15 shdrs = vdso + FUNC(swap_uint)(ehdr->e_shoff); in FUNC() 16 sh_count = swap_uint16(ehdr->e_shnum); in FUNC() 17 sh_entsize = swap_uint16(ehdr->e_shentsize); in FUNC() 19 shdr = shdrs + (sh_entsize * swap_uint16(ehdr->e_shstrndx)); in FUNC() 60 const ELF(Ehdr) *ehdr = vdso; in FUNC() 69 shdrs = vdso + FUNC(swap_uint)(ehdr->e_shoff); in FUNC() 70 sh_count = swap_uint16(ehdr->e_shnum); in FUNC() 71 sh_entsize = swap_uint16(ehdr->e_shentsize); in FUNC() 87 flags = swap_uint32(ehdr->e_flags); in FUNC()
|
| /linux/arch/arm64/kvm/hyp/nvhe/ |
| H A D | gen-hyprel.c | 137 Elf64_Ehdr *ehdr; member 189 for (var = elf.sh_table; var < elf.sh_table + elf16toh(elf.ehdr->e_shnum); ++var) 263 assert_ge(stat.st_size, sizeof(*elf.ehdr), "%lu"); in init_elf() 264 elf.ehdr = elf_ptr(Elf64_Ehdr, 0); in init_elf() 267 assert_eq(elf.ehdr->e_ident[EI_MAG0], ELFMAG0, "0x%x"); in init_elf() 268 assert_eq(elf.ehdr->e_ident[EI_MAG1], ELFMAG1, "0x%x"); in init_elf() 269 assert_eq(elf.ehdr->e_ident[EI_MAG2], ELFMAG2, "0x%x"); in init_elf() 270 assert_eq(elf.ehdr->e_ident[EI_MAG3], ELFMAG3, "0x%x"); in init_elf() 273 assert_eq(elf.ehdr->e_ident[EI_CLASS], ELFCLASS64, "%u"); in init_elf() 274 assert_eq(elf.ehdr->e_ident[EI_DATA], ELFENDIAN, "%u"); in init_elf() [all …]
|
| /linux/kernel/ |
| H A D | crash_core.c | 174 Elf64_Ehdr *ehdr; in crash_prepare_elf64_headers() local 202 ehdr = (Elf64_Ehdr *)buf; in crash_prepare_elf64_headers() 203 phdr = (Elf64_Phdr *)(ehdr + 1); in crash_prepare_elf64_headers() 204 memcpy(ehdr->e_ident, ELFMAG, SELFMAG); in crash_prepare_elf64_headers() 205 ehdr->e_ident[EI_CLASS] = ELFCLASS64; in crash_prepare_elf64_headers() 206 ehdr->e_ident[EI_DATA] = ELFDATA2LSB; in crash_prepare_elf64_headers() 207 ehdr->e_ident[EI_VERSION] = EV_CURRENT; in crash_prepare_elf64_headers() 208 ehdr->e_ident[EI_OSABI] = ELF_OSABI; in crash_prepare_elf64_headers() 209 memset(ehdr->e_ident + EI_PAD, 0, EI_NIDENT - EI_PAD); in crash_prepare_elf64_headers() 210 ehdr->e_type = ET_CORE; in crash_prepare_elf64_headers() [all …]
|
| /linux/arch/arm/kernel/ |
| H A D | vdso.c | 88 static void * __init find_section(Elf32_Ehdr *ehdr, const char *name, 96 sechdrs = (void *)ehdr + ehdr->e_shoff; in find_section() 97 secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset; in find_section() 100 for (i = 1; i < ehdr->e_shnum; i++) { in find_section() 104 return (void *)ehdr + sechdrs[i].sh_offset; in find_section() 144 static void __init patch_vdso(void *ehdr) 149 .hdr = ehdr, in patch_vdso() 89 find_section(Elf32_Ehdr * ehdr,const char * name,unsigned long * size) find_section() argument 145 patch_vdso(void * ehdr) patch_vdso() argument
|
| /linux/arch/x86/boot/compressed/ |
| H A D | misc.c | 284 Elf64_Ehdr ehdr; in parse_elf() local 287 Elf32_Ehdr ehdr; in parse_elf() 293 memcpy(&ehdr, output, sizeof(ehdr)); in parse_elf() 294 if (ehdr.e_ident[EI_MAG0] != ELFMAG0 || in parse_elf() 295 ehdr.e_ident[EI_MAG1] != ELFMAG1 || in parse_elf() 296 ehdr.e_ident[EI_MAG2] != ELFMAG2 || in parse_elf() 297 ehdr.e_ident[EI_MAG3] != ELFMAG3) in parse_elf() 302 phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum); in parse_elf() 306 memcpy(phdrs, output + ehdr.e_phoff, sizeof(*phdrs) * ehdr.e_phnum); in parse_elf() 308 for (i = 0; i < ehdr.e_phnum; i++) { in parse_elf() [all …]
|
| /linux/arch/loongarch/kernel/ |
| H A D | kexec_elf.c | 21 struct elfhdr *ehdr, struct kexec_elf_info *elf_info, in _elf_kexec_load() argument 27 for (i = 0; i < ehdr->e_phnum; i++) { in _elf_kexec_load() 61 struct elfhdr ehdr; in elf_kexec_load() local 66 ret = kexec_build_elf_info(kernel, kernel_len, &ehdr, &elf_info); in elf_kexec_load() 80 ret = _elf_kexec_load(image, &ehdr, &elf_info, &kbuf, &text_offset); in elf_kexec_load() 92 image->start = kernel_segment->mem + __pa(ehdr.e_entry) - text_offset; in elf_kexec_load()
|
| /linux/fs/proc/ |
| H A D | vmcore.c | 1217 Elf64_Ehdr ehdr; in parse_crash_elf64_headers() 1223 rc = elfcorehdr_read((char *)&ehdr, sizeof(Elf64_Ehdr), &addr); in parse_crash_elf64_headers() 1228 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 || in parse_crash_elf64_headers() 1229 (ehdr.e_type != ET_CORE) || in parse_crash_elf64_headers() 1230 !vmcore_elf64_check_arch(&ehdr) || in parse_crash_elf64_headers() 1231 ehdr.e_ident[EI_CLASS] != ELFCLASS64 || in parse_crash_elf64_headers() 1232 ehdr.e_ident[EI_VERSION] != EV_CURRENT || in parse_crash_elf64_headers() 1233 ehdr.e_version != EV_CURRENT || in parse_crash_elf64_headers() 1234 ehdr.e_ehsize != sizeof(Elf64_Ehdr) || in parse_crash_elf64_headers() 1235 ehdr in parse_crash_elf64_headers() 1216 Elf64_Ehdr ehdr; parse_crash_elf64_headers() local 1272 Elf32_Ehdr ehdr; parse_crash_elf32_headers() local 1402 Elf64_Ehdr *ehdr = (Elf64_Ehdr *)elfptr; vmcoredd_update_program_headers() local 1422 Elf32_Ehdr *ehdr = (Elf32_Ehdr *)elfptr; vmcoredd_update_program_headers() local 1569 Elf64_Ehdr *ehdr = (Elf64_Ehdr *)elfcorebuf; vmcore_reset_offsets_elf64() local 1596 Elf64_Ehdr *ehdr = (Elf64_Ehdr *)elfcorebuf; vmcore_add_device_ram_elf64() local [all...] |
| /linux/tools/testing/selftests/coredump/ |
| H A D | coredump_test_helpers.c | 362 static bool is_core_ehdr(const ElfW(Ehdr) *ehdr) in is_core_ehdr() argument 364 return !memcmp(ehdr->e_ident, ELFMAG, SELFMAG) && in is_core_ehdr() 365 ehdr->e_ident[EI_CLASS] == COREDUMP_ELFCLASS && in is_core_ehdr() 366 ehdr->e_type == ET_CORE; in is_core_ehdr() 372 ElfW(Ehdr) ehdr; in is_elf_core() 374 if (pread(fd, &ehdr, sizeof(ehdr), 0) != sizeof(ehdr)) { in is_elf_core() 379 if (!is_core_ehdr(&ehdr)) { in is_elf_core() 495 const ElfW(Ehdr) *ehdr = (const ElfW(Ehdr) *)ctx->head; in compact_probe() 499 if (ctx->data_offset || ctx->head_len < sizeof(*ehdr)) in compact_probe() 502 if (!is_core_ehdr(ehdr)) { in compact_probe() [all …]
|