Home
last modified time | relevance | path

Searched refs:ehdr (Results 1 – 49 of 49) sorted by relevance

/linux-4.4.14/drivers/remoteproc/
Dremoteproc_elf_loader.c47 struct elf32_hdr *ehdr; local
60 ehdr = (struct elf32_hdr *)fw->data;
63 class = ehdr->e_ident[EI_CLASS];
71 if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB) {
73 if (ehdr->e_ident[EI_DATA] != ELFDATA2MSB) {
79 if (fw->size < ehdr->e_shoff + sizeof(struct elf32_shdr)) {
84 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG)) {
89 if (ehdr->e_phnum == 0) {
94 if (ehdr->e_phoff > fw->size) {
116 struct elf32_hdr *ehdr = (struct elf32_hdr *)fw->data; local
[all …]
/linux-4.4.14/tools/perf/util/
Dsymbol-minimal.c109 Elf32_Ehdr ehdr; in filename__read_build_id() local
112 if (fread(&ehdr, sizeof(ehdr), 1, fp) != 1) in filename__read_build_id()
116 ehdr.e_phoff = bswap_32(ehdr.e_phoff); in filename__read_build_id()
117 ehdr.e_phentsize = bswap_16(ehdr.e_phentsize); in filename__read_build_id()
118 ehdr.e_phnum = bswap_16(ehdr.e_phnum); in filename__read_build_id()
121 buf_size = ehdr.e_phentsize * ehdr.e_phnum; in filename__read_build_id()
126 fseek(fp, ehdr.e_phoff, SEEK_SET); in filename__read_build_id()
130 for (i = 0, phdr = buf; i < ehdr.e_phnum; i++, phdr++) { in filename__read_build_id()
160 Elf64_Ehdr ehdr; in filename__read_build_id() local
163 if (fread(&ehdr, sizeof(ehdr), 1, fp) != 1) in filename__read_build_id()
[all …]
Dsymbol-elf.c44 GElf_Ehdr *ehdr; in elf_getphdrnum() local
46 ehdr = gelf_getehdr(elf, &gehdr); in elf_getphdrnum()
47 if (!ehdr) in elf_getphdrnum()
50 *dst = ehdr->e_phnum; in elf_getphdrnum()
227 GElf_Ehdr ehdr; in dso__synthesize_plt_symbols() local
236 ehdr = ss->ehdr; in dso__synthesize_plt_symbols()
245 scn_plt_rel = elf_section_by_name(elf, &ehdr, &shdr_rel_plt, in dso__synthesize_plt_symbols()
248 scn_plt_rel = elf_section_by_name(elf, &ehdr, &shdr_rel_plt, in dso__synthesize_plt_symbols()
259 if (elf_section_by_name(elf, &ehdr, &shdr_plt, ".plt", NULL) == NULL) in dso__synthesize_plt_symbols()
352 GElf_Ehdr ehdr; in elf_read_build_id() local
[all …]
Dunwind-libunwind.c166 GElf_Ehdr ehdr; in elf_section_offset() local
175 if (gelf_getehdr(elf, &ehdr) == NULL) in elf_section_offset()
178 if (!elf_section_by_name(elf, &ehdr, &shdr, name, NULL)) in elf_section_offset()
192 GElf_Ehdr ehdr; in elf_is_exec() local
198 if (gelf_getehdr(elf, &ehdr) == NULL) in elf_is_exec()
201 retval = (ehdr.e_type == ET_EXEC); in elf_is_exec()
Dsymbol.h205 GElf_Ehdr ehdr; member
309 bool elf__needs_adjust_symbols(GElf_Ehdr ehdr);
Dprobe-finder.c1028 GElf_Ehdr ehdr; in debuginfo__find_probes() local
1036 if (gelf_getehdr(elf, &ehdr) == NULL) in debuginfo__find_probes()
1039 if (elf_section_by_name(elf, &ehdr, &shdr, ".eh_frame", NULL) && in debuginfo__find_probes()
Dprobe-event.c480 GElf_Ehdr ehdr; in get_text_start_address() local
492 if (gelf_getehdr(elf, &ehdr) == NULL) in get_text_start_address()
495 if (!elf_section_by_name(elf, &ehdr, &shdr, ".text", NULL)) in get_text_start_address()
/linux-4.4.14/arch/x86/tools/
Drelocs.c13 static Elf_Ehdr ehdr; variable
241 sec_strtab = secs[ehdr.e_shstrndx].strtab; in sec_name()
243 if (shndx < ehdr.e_shnum) { in sec_name()
271 for (i = 0; i < ehdr.e_shnum; i++) { in sym_lookup()
335 if (fread(&ehdr, sizeof(ehdr), 1, fp) != 1) { in read_ehdr()
339 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) { in read_ehdr()
342 if (ehdr.e_ident[EI_CLASS] != ELF_CLASS) { in read_ehdr()
345 if (ehdr.e_ident[EI_DATA] != ELFDATA2LSB) { in read_ehdr()
348 if (ehdr.e_ident[EI_VERSION] != EV_CURRENT) { in read_ehdr()
352 ehdr.e_type = elf_half_to_cpu(ehdr.e_type); in read_ehdr()
[all …]
/linux-4.4.14/scripts/
Drecordmcount.h178 static void append_func(Elf_Ehdr *const ehdr, in append_func() argument
192 unsigned const old_shnum = w2(ehdr->e_shnum); in append_func()
193 uint_t const old_shoff = _w(ehdr->e_shoff); in append_func()
207 uwrite(fd_map, old_shstr_sh_offset + (void *)ehdr, old_shstr_sh_size); in append_func()
213 uwrite(fd_map, old_shoff + (void *)ehdr, in append_func()
248 ehdr->e_shoff = _w(new_e_shoff); in append_func()
249 ehdr->e_shnum = w2(2 + w2(ehdr->e_shnum)); /* {.rel,}__mcount_loc */ in append_func()
251 uwrite(fd_map, ehdr, sizeof(*ehdr)); in append_func()
277 Elf_Ehdr const *const ehdr, in get_sym_str_and_relp() argument
282 Elf_Shdr *const shdr0 = (Elf_Shdr *)(_w(ehdr->e_shoff) in get_sym_str_and_relp()
[all …]
Dsortextable.c242 Elf32_Ehdr *ehdr = mmap_file(fname); in do_file() local
244 ehdr_curr = ehdr; in do_file()
245 switch (ehdr->e_ident[EI_DATA]) { in do_file()
248 ehdr->e_ident[EI_DATA], fname); in do_file()
268 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 in do_file()
269 || r2(&ehdr->e_type) != ET_EXEC in do_file()
270 || ehdr->e_ident[EI_VERSION] != EV_CURRENT) { in do_file()
276 switch (r2(&ehdr->e_machine)) { in do_file()
279 r2(&ehdr->e_machine), fname); in do_file()
297 switch (ehdr->e_ident[EI_CLASS]) { in do_file()
[all …]
Dsortextable.h93 do_func(Elf_Ehdr *ehdr, char const *const fname, table_sort_t custom_sort) in do_func() argument
117 shdr = (Elf_Shdr *)((char *)ehdr + _r(&ehdr->e_shoff)); in do_func()
119 num_sections = r2(&ehdr->e_shnum); in do_func()
123 secindex_strings = r2(&ehdr->e_shstrndx); in do_func()
128 secstrtab = (const char *)ehdr + _r(&shstrtab_sec->sh_offset); in do_func()
138 relocs = (void *)ehdr + _r(&shdr[i].sh_offset); in do_func()
147 (const char *)ehdr + _r(&shdr[i].sh_offset)); in do_func()
157 symtab = (const Elf_Sym *)((const char *)ehdr + in do_func()
163 strtab = (const char *)ehdr + _r(&strtab_sec->sh_offset); in do_func()
165 extab_image = (void *)ehdr + _r(&extab_sec->sh_offset); in do_func()
[all …]
Drecordmcount.c404 Elf32_Ehdr *const ehdr = mmap_file(fname); in do_file() local
410 switch (ehdr->e_ident[EI_DATA]) { in do_file()
414 ehdr->e_ident[EI_DATA], fname); in do_file()
434 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 in do_file()
435 || w2(ehdr->e_type) != ET_REL in do_file()
436 || ehdr->e_ident[EI_VERSION] != EV_CURRENT) { in do_file()
442 switch (w2(ehdr->e_machine)) { in do_file()
445 w2(ehdr->e_machine), fname); in do_file()
487 switch (ehdr->e_ident[EI_CLASS]) { in do_file()
490 ehdr->e_ident[EI_CLASS], fname); in do_file()
[all …]
/linux-4.4.14/arch/x86/kernel/
Dcrash.c65 void *ehdr; member
355 Elf64_Ehdr *ehdr; in prepare_elf64_ram_headers_callback() local
362 ehdr = ced->ehdr; in prepare_elf64_ram_headers_callback()
395 ehdr->e_phnum++; in prepare_elf64_ram_headers_callback()
398 ehdr->e_phnum, phdr->p_offset); in prepare_elf64_ram_headers_callback()
407 Elf64_Ehdr *ehdr; in prepare_elf64_headers() local
436 ehdr = (Elf64_Ehdr *)bufp; in prepare_elf64_headers()
438 memcpy(ehdr->e_ident, ELFMAG, SELFMAG); in prepare_elf64_headers()
439 ehdr->e_ident[EI_CLASS] = ELFCLASS64; in prepare_elf64_headers()
440 ehdr->e_ident[EI_DATA] = ELFDATA2LSB; in prepare_elf64_headers()
[all …]
Dmachine_kexec_64.c408 int arch_kexec_apply_relocations_add(const Elf64_Ehdr *ehdr, in arch_kexec_apply_relocations_add() argument
435 if (symtabsec->sh_link >= ehdr->e_shnum) { in arch_kexec_apply_relocations_add()
445 shstrtab = (char *)sechdrs[ehdr->e_shstrndx].sh_offset; in arch_kexec_apply_relocations_add()
494 else if (sym->st_shndx >= ehdr->e_shnum) { in arch_kexec_apply_relocations_add()
/linux-4.4.14/kernel/
Dkexec_file.c120 arch_kexec_apply_relocations_add(const Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, in arch_kexec_apply_relocations_add() argument
129 arch_kexec_apply_relocations(const Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, in arch_kexec_apply_relocations() argument
678 sechdrs_c = (void *)pi->ehdr + pi->ehdr->e_shoff; in __kexec_load_purgatory()
687 sechdrs = vzalloc(pi->ehdr->e_shnum * sizeof(Elf_Shdr)); in __kexec_load_purgatory()
691 memcpy(sechdrs, sechdrs_c, pi->ehdr->e_shnum * sizeof(Elf_Shdr)); in __kexec_load_purgatory()
707 for (i = 0; i < pi->ehdr->e_shnum; i++) { in __kexec_load_purgatory()
711 sechdrs[i].sh_offset = (unsigned long)pi->ehdr + in __kexec_load_purgatory()
719 entry = pi->ehdr->e_entry; in __kexec_load_purgatory()
720 for (i = 0; i < pi->ehdr->e_shnum; i++) { in __kexec_load_purgatory()
728 if (sechdrs[i].sh_addr <= pi->ehdr->e_entry && in __kexec_load_purgatory()
[all …]
/linux-4.4.14/arch/mips/vdso/
Dgenvdso.h13 const ELF(Ehdr) *ehdr = vdso; in FUNC()
21 shdrs = vdso + FUNC(swap_uint)(ehdr->e_shoff); in FUNC()
22 sh_count = swap_uint16(ehdr->e_shnum); in FUNC()
23 sh_entsize = swap_uint16(ehdr->e_shentsize); in FUNC()
25 shdr = shdrs + (sh_entsize * swap_uint16(ehdr->e_shstrndx)); in FUNC()
115 const ELF(Ehdr) *ehdr = vdso; in FUNC()
124 shdrs = vdso + FUNC(swap_uint)(ehdr->e_shoff); in FUNC()
125 sh_count = swap_uint16(ehdr->e_shnum); in FUNC()
126 sh_entsize = swap_uint16(ehdr->e_shentsize); in FUNC()
142 flags = swap_uint32(ehdr->e_flags); in FUNC()
Dgenvdso.c117 const Elf32_Ehdr *ehdr; in map_vdso() local
141 ehdr = addr; in map_vdso()
143 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0) { in map_vdso()
149 elf_class = ehdr->e_ident[EI_CLASS]; in map_vdso()
160 switch (ehdr->e_ident[EI_DATA]) { in map_vdso()
163 need_swap = ehdr->e_ident[EI_DATA] != HOST_ORDER; in map_vdso()
171 if (swap_uint16(ehdr->e_machine) != EM_MIPS) { in map_vdso()
176 } else if (swap_uint16(ehdr->e_type) != ET_DYN) { in map_vdso()
/linux-4.4.14/arch/x86/boot/compressed/
Dmisc.c338 Elf64_Ehdr ehdr; in parse_elf() local
341 Elf32_Ehdr ehdr; in parse_elf()
347 memcpy(&ehdr, output, sizeof(ehdr)); in parse_elf()
348 if (ehdr.e_ident[EI_MAG0] != ELFMAG0 || in parse_elf()
349 ehdr.e_ident[EI_MAG1] != ELFMAG1 || in parse_elf()
350 ehdr.e_ident[EI_MAG2] != ELFMAG2 || in parse_elf()
351 ehdr.e_ident[EI_MAG3] != ELFMAG3) { in parse_elf()
358 phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum); in parse_elf()
362 memcpy(phdrs, output + ehdr.e_phoff, sizeof(*phdrs) * ehdr.e_phnum); in parse_elf()
364 for (i = 0; i < ehdr.e_phnum; i++) { in parse_elf()
/linux-4.4.14/arch/powerpc/oprofile/cell/
Dvma_map.c116 Elf32_Ehdr ehdr; in create_vma_map() local
132 if (copy_from_user(&ehdr, spu_elf_start, sizeof (ehdr))) in create_vma_map()
135 if (memcmp(ehdr.e_ident, expected, EI_PAD) != 0) { in create_vma_map()
141 if (ehdr.e_machine != EM_SPU) { in create_vma_map()
147 if (ehdr.e_type != ET_EXEC) { in create_vma_map()
153 phdr_start = spu_elf_start + ehdr.e_phoff; in create_vma_map()
154 shdr_start = spu_elf_start + ehdr.e_shoff; in create_vma_map()
157 for (i = 0; i < ehdr.e_phnum; i++) { in create_vma_map()
174 for (i = 0; i < ehdr.e_shnum; i++) { in create_vma_map()
/linux-4.4.14/samples/bpf/
Dbpf_load.c170 static int get_sec(Elf *elf, int i, GElf_Ehdr *ehdr, char **shname, in get_sec() argument
182 *shname = elf_strptr(elf, ehdr->e_shstrndx, shdr->sh_name); in get_sec()
227 GElf_Ehdr ehdr; in load_bpf_file() local
244 if (gelf_getehdr(elf, &ehdr) != &ehdr) in load_bpf_file()
251 for (i = 1; i < ehdr.e_shnum; i++) { in load_bpf_file()
253 if (get_sec(elf, i, &ehdr, &shname, &shdr, &data)) in load_bpf_file()
282 for (i = 1; i < ehdr.e_shnum; i++) { in load_bpf_file()
284 if (get_sec(elf, i, &ehdr, &shname, &shdr, &data)) in load_bpf_file()
289 if (get_sec(elf, shdr.sh_info, &ehdr, &shname_prog, in load_bpf_file()
309 for (i = 1; i < ehdr.e_shnum; i++) { in load_bpf_file()
[all …]
/linux-4.4.14/drivers/s390/crypto/
Dzcrypt_error.h93 struct error_hdr *ehdr = reply->message; in convert_error() local
95 switch (ehdr->reply_code) { in convert_error()
117 zdev->ap_dev->qid, zdev->online, ehdr->reply_code); in convert_error()
128 zdev->ap_dev->qid, zdev->online, ehdr->reply_code); in convert_error()
135 zdev->ap_dev->qid, zdev->online, ehdr->reply_code); in convert_error()
/linux-4.4.14/arch/arm/kernel/
Dvdso.c99 static void * __init find_section(Elf32_Ehdr *ehdr, const char *name, in find_section() argument
107 sechdrs = (void *)ehdr + ehdr->e_shoff; in find_section()
108 secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset; in find_section()
111 for (i = 1; i < ehdr->e_shnum; i++) { in find_section()
115 return (void *)ehdr + sechdrs[i].sh_offset; in find_section()
155 static void __init patch_vdso(void *ehdr) in patch_vdso() argument
160 .hdr = ehdr, in patch_vdso()
Dmodule-plts.c132 int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, in module_frob_arch_sections() argument
136 Elf32_Shdr *s, *sechdrs_end = sechdrs + ehdr->e_shnum; in module_frob_arch_sections()
154 const Elf32_Rel *rels = (void *)ehdr + s->sh_offset; in module_frob_arch_sections()
/linux-4.4.14/tools/perf/arch/powerpc/util/
Dsym-handling.c15 bool elf__needs_adjust_symbols(GElf_Ehdr ehdr) in elf__needs_adjust_symbols() argument
17 return ehdr.e_type == ET_EXEC || in elf__needs_adjust_symbols()
18 ehdr.e_type == ET_REL || in elf__needs_adjust_symbols()
19 ehdr.e_type == ET_DYN; in elf__needs_adjust_symbols()
/linux-4.4.14/fs/proc/
Dvmcore.c1002 Elf64_Ehdr ehdr; in parse_crash_elf64_headers() local
1008 rc = elfcorehdr_read((char *)&ehdr, sizeof(Elf64_Ehdr), &addr); in parse_crash_elf64_headers()
1013 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 || in parse_crash_elf64_headers()
1014 (ehdr.e_type != ET_CORE) || in parse_crash_elf64_headers()
1015 !vmcore_elf64_check_arch(&ehdr) || in parse_crash_elf64_headers()
1016 ehdr.e_ident[EI_CLASS] != ELFCLASS64 || in parse_crash_elf64_headers()
1017 ehdr.e_ident[EI_VERSION] != EV_CURRENT || in parse_crash_elf64_headers()
1018 ehdr.e_version != EV_CURRENT || in parse_crash_elf64_headers()
1019 ehdr.e_ehsize != sizeof(Elf64_Ehdr) || in parse_crash_elf64_headers()
1020 ehdr.e_phentsize != sizeof(Elf64_Phdr) || in parse_crash_elf64_headers()
[all …]
/linux-4.4.14/arch/s390/kernel/
Dcrash_dump.c467 static void *ehdr_init(Elf64_Ehdr *ehdr, int mem_chunk_cnt) in ehdr_init() argument
469 memset(ehdr, 0, sizeof(*ehdr)); in ehdr_init()
470 memcpy(ehdr->e_ident, ELFMAG, SELFMAG); in ehdr_init()
471 ehdr->e_ident[EI_CLASS] = ELFCLASS64; in ehdr_init()
472 ehdr->e_ident[EI_DATA] = ELFDATA2MSB; in ehdr_init()
473 ehdr->e_ident[EI_VERSION] = EV_CURRENT; in ehdr_init()
474 memset(ehdr->e_ident + EI_PAD, 0, EI_NIDENT - EI_PAD); in ehdr_init()
475 ehdr->e_type = ET_CORE; in ehdr_init()
476 ehdr->e_machine = EM_S390; in ehdr_init()
477 ehdr->e_version = EV_CURRENT; in ehdr_init()
[all …]
/linux-4.4.14/arch/powerpc/kernel/
Dvdso.c255 static void * __init find_section32(Elf32_Ehdr *ehdr, const char *secname, in find_section32() argument
263 sechdrs = (void *)ehdr + ehdr->e_shoff; in find_section32()
264 secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset; in find_section32()
267 for (i = 1; i < ehdr->e_shnum; i++) { in find_section32()
271 return (void *)ehdr + sechdrs[i].sh_offset; in find_section32()
360 static void * __init find_section64(Elf64_Ehdr *ehdr, const char *secname, in find_section64() argument
368 sechdrs = (void *)ehdr + ehdr->e_shoff; in find_section64()
369 secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset; in find_section64()
372 for (i = 1; i < ehdr->e_shnum; i++) { in find_section64()
376 return (void *)ehdr + sechdrs[i].sh_offset; in find_section64()
/linux-4.4.14/drivers/media/platform/sti/c8sectpfe/
Dc8sectpfe-core.c976 struct elf32_hdr *ehdr; in c8sectpfe_elf_sanity_check() local
989 ehdr = (struct elf32_hdr *)fw->data; in c8sectpfe_elf_sanity_check()
992 class = ehdr->e_ident[EI_CLASS]; in c8sectpfe_elf_sanity_check()
998 if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB) { in c8sectpfe_elf_sanity_check()
1003 if (fw->size < ehdr->e_shoff + sizeof(struct elf32_shdr)) { in c8sectpfe_elf_sanity_check()
1008 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG)) { in c8sectpfe_elf_sanity_check()
1014 ehdr = (Elf32_Ehdr *)fw->data; in c8sectpfe_elf_sanity_check()
1015 if (ehdr->e_ident[EI_MAG0] != ELFMAG0 || in c8sectpfe_elf_sanity_check()
1016 ehdr->e_ident[EI_MAG1] != ELFMAG1 || in c8sectpfe_elf_sanity_check()
1017 ehdr->e_ident[EI_MAG2] != ELFMAG2 || in c8sectpfe_elf_sanity_check()
[all …]
/linux-4.4.14/arch/mips/kernel/
Delf.c126 struct elf32_hdr *ehdr = _ehdr; in arch_check_elf() local
145 is_mips64 = (ehdr->e_ident[EI_CLASS] == ELFCLASS64) || in arch_check_elf()
146 (ehdr->e_flags & EF_MIPS_ABI2); in arch_check_elf()
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/
Drammap.h18 u8 ever, u8 ehdr, u8 ecnt, u8 elen, int idx,
23 u8 ever, u8 ehdr, u8 ecnt, u8 elen, int idx,
/linux-4.4.14/include/linux/
Dkexec.h119 Elf_Ehdr *ehdr; member
327 int __weak arch_kexec_apply_relocations_add(const Elf_Ehdr *ehdr,
329 int __weak arch_kexec_apply_relocations(const Elf_Ehdr *ehdr, Elf_Shdr *sechdrs,
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/bios/
Drammap.c147 u8 ever, u8 ehdr, u8 ecnt, u8 elen, int idx, u8 *ver, u8 *hdr) in nvbios_rammapSe() argument
150 data = data + ehdr + (idx * elen); in nvbios_rammapSe()
191 u8 ever, u8 ehdr, u8 ecnt, u8 elen, int idx, in nvbios_rammapSp() argument
194 data = nvbios_rammapSe(bios, data, ever, ehdr, ecnt, elen, idx, ver, hdr); in nvbios_rammapSp()
/linux-4.4.14/net/ipv4/
Dxfrm4_policy.c156 __be32 *ehdr; in _decode_session4() local
159 ehdr = (__be32 *)xprth; in _decode_session4()
161 fl4->fl4_ipsec_spi = ehdr[0]; in _decode_session4()
/linux-4.4.14/arch/mips/include/asm/
Delf.h448 extern int arch_elf_pt_proc(void *ehdr, void *phdr, struct file *elf,
451 extern int arch_check_elf(void *ehdr, bool has_interpreter,
/linux-4.4.14/tools/lib/bpf/
Dlibbpf.c189 GElf_Ehdr ehdr; member
392 if (!gelf_getehdr(obj->efile.elf, &obj->efile.ehdr)) { in bpf_object__elf_init()
398 ep = &obj->efile.ehdr; in bpf_object__elf_init()
418 switch (obj->efile.ehdr.e_ident[EI_DATA]) { in bpf_object__check_endianness()
493 GElf_Ehdr *ep = &obj->efile.ehdr; in bpf_object__elf_collect()
/linux-4.4.14/tools/lguest/
Dlguest.c430 static unsigned long map_elf(int elf_fd, const Elf32_Ehdr *ehdr) in map_elf() argument
432 Elf32_Phdr phdr[ehdr->e_phnum]; in map_elf()
439 if (ehdr->e_type != ET_EXEC in map_elf()
440 || ehdr->e_machine != EM_386 in map_elf()
441 || ehdr->e_phentsize != sizeof(Elf32_Phdr) in map_elf()
442 || ehdr->e_phnum < 1 || ehdr->e_phnum > 65536U/sizeof(Elf32_Phdr)) in map_elf()
452 if (lseek(elf_fd, ehdr->e_phoff, SEEK_SET) < 0) in map_elf()
461 for (i = 0; i < ehdr->e_phnum; i++) { in map_elf()
475 return ehdr->e_entry; in map_elf()
/linux-4.4.14/net/wireless/
Dutil.c516 struct ethhdr *ehdr; in ieee80211_data_to_8023() local
521 ehdr = (struct ethhdr *) skb_push(skb, sizeof(struct ethhdr)); in ieee80211_data_to_8023()
522 memcpy(ehdr->h_dest, dst, ETH_ALEN); in ieee80211_data_to_8023()
523 memcpy(ehdr->h_source, src, ETH_ALEN); in ieee80211_data_to_8023()
524 ehdr->h_proto = len; in ieee80211_data_to_8023()
/linux-4.4.14/arch/ia64/kernel/
Dmodule.c421 module_frob_arch_sections (Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, char *secstrings, in module_frob_arch_sections() argument
425 Elf64_Shdr *s, *sechdrs_end = sechdrs + ehdr->e_shnum; in module_frob_arch_sections()
450 const Elf64_Rela *rels = (void *)ehdr + s->sh_offset; in module_frob_arch_sections()
/linux-4.4.14/net/mac80211/
Drx.c2033 struct ethhdr *ehdr; in __ieee80211_data_to_8023() local
2058 ehdr = (struct ethhdr *) rx->skb->data; in __ieee80211_data_to_8023()
2059 if (ehdr->h_proto == rx->sdata->control_port_protocol) in __ieee80211_data_to_8023()
2074 struct ethhdr *ehdr = (struct ethhdr *) rx->skb->data; in ieee80211_frame_allowed() local
2080 if (ehdr->h_proto == rx->sdata->control_port_protocol && in ieee80211_frame_allowed()
2081 (ether_addr_equal(ehdr->h_dest, rx->sdata->vif.addr) || in ieee80211_frame_allowed()
2082 ether_addr_equal(ehdr->h_dest, pae_group_addr))) in ieee80211_frame_allowed()
2101 struct ethhdr *ehdr = (struct ethhdr *) rx->skb->data; in ieee80211_deliver_skb() local
2113 if (is_multicast_ether_addr(ehdr->h_dest)) { in ieee80211_deliver_skb()
/linux-4.4.14/drivers/message/fusion/
Dmptsas.c1360 cfg.cfghdr.ehdr = &hdr; in mptsas_sas_enclosure_pg0()
2020 cfg.cfghdr.ehdr = &hdr; in mptsas_get_linkerrors()
2377 cfg.cfghdr.ehdr = &hdr; in mptsas_sas_io_unit_pg0()
2451 cfg.cfghdr.ehdr = &hdr; in mptsas_sas_io_unit_pg1()
2454 cfg.cfghdr.ehdr->PageType = MPI_CONFIG_PAGETYPE_EXTENDED; in mptsas_sas_io_unit_pg1()
2455 cfg.cfghdr.ehdr->ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT; in mptsas_sas_io_unit_pg1()
2456 cfg.cfghdr.ehdr->PageVersion = MPI_SASIOUNITPAGE1_PAGEVERSION; in mptsas_sas_io_unit_pg1()
2457 cfg.cfghdr.ehdr->PageNumber = 1; in mptsas_sas_io_unit_pg1()
2513 cfg.cfghdr.ehdr = &hdr; in mptsas_sas_phy_pg0()
2578 cfg.cfghdr.ehdr = &hdr; in mptsas_sas_device_pg0()
[all …]
Dmptbase.h895 ConfigExtendedPageHeader_t *ehdr; member
Dmptbase.c295 cfg.cfghdr.ehdr = &hdr; in mpt_is_discovery_complete()
6396 pExtHdr = (ConfigExtendedPageHeader_t *)pCfg->cfghdr.ehdr; in mpt_config()
6470 pCfg->cfghdr.ehdr->ExtPageLength = in mpt_config()
6472 pCfg->cfghdr.ehdr->ExtPageType = in mpt_config()
/linux-4.4.14/drivers/staging/rtl8723au/core/
Drtw_xmit.c425 struct ethhdr *ehdr = (struct ethhdr *) skb->data; in update_attrib() local
427 pattrib->ether_type = ntohs(ehdr->h_proto); in update_attrib()
429 ether_addr_copy(pattrib->dst, ehdr->h_dest); in update_attrib()
430 ether_addr_copy(pattrib->src, ehdr->h_source); in update_attrib()
/linux-4.4.14/drivers/net/ethernet/stmicro/stmmac/
Dstmmac_main.c2099 struct ethhdr *ehdr; in stmmac_rx_vlan() local
2106 ehdr = (struct ethhdr *)skb->data; in stmmac_rx_vlan()
2107 memmove(skb->data + VLAN_HLEN, ehdr, ETH_ALEN * 2); in stmmac_rx_vlan()
/linux-4.4.14/fs/
Dbinfmt_elf.c481 static inline int arch_elf_pt_proc(struct elfhdr *ehdr, in arch_elf_pt_proc() argument
504 static inline int arch_check_elf(struct elfhdr *ehdr, bool has_interp, in arch_check_elf() argument
/linux-4.4.14/drivers/net/vmxnet3/
Dvmxnet3_drv.c3368 struct ethhdr *ehdr; in vmxnet3_suspend() local
3420 ehdr = (struct ethhdr *)pmConf->filters[i].pattern; in vmxnet3_suspend()
3421 ehdr->h_proto = htons(ETH_P_ARP); in vmxnet3_suspend()
/linux-4.4.14/net/key/
Daf_key.c488 const struct sadb_ext *ehdr = (const struct sadb_ext *) p; in parse_exthdrs() local
492 ext_len = ehdr->sadb_ext_len; in parse_exthdrs()
494 ext_type = ehdr->sadb_ext_type; in parse_exthdrs()
/linux-4.4.14/drivers/net/ethernet/sun/
Dniu.c6564 static u64 niu_compute_tx_flags(struct sk_buff *skb, struct ethhdr *ehdr, in niu_compute_tx_flags() argument
6572 eth_proto = be16_to_cpu(ehdr->h_proto); in niu_compute_tx_flags()
6575 struct vlan_ethhdr *vp = (struct vlan_ethhdr *) ehdr; in niu_compute_tx_flags()
6638 struct ethhdr *ehdr; in niu_start_xmit() local
6671 ehdr = (struct ethhdr *) skb->data; in niu_start_xmit()
6675 tp->flags = cpu_to_le64(niu_compute_tx_flags(skb, ehdr, align, len)); in niu_start_xmit()
/linux-4.4.14/drivers/net/ethernet/emulex/benet/
Dbe_main.c1032 struct ipv6_opt_hdr *ehdr = in be_ipv6_exthdr_check() local
1036 if (ehdr->hdrlen == 0xff) in be_ipv6_exthdr_check()