Home
last modified time | relevance | path

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

12

/tools/perf/util/
A Dsymbol-elf.c68 GElf_Ehdr *ehdr; in elf_getphdrnum() local
71 if (!ehdr) in elf_getphdrnum()
227 GElf_Ehdr ehdr; in filename__has_section() local
625 GElf_Ehdr ehdr; in dso__synthesize_plt_symbols() local
633 ehdr = ss->ehdr; in dso__synthesize_plt_symbols()
1136 return ehdr.e_type == ET_EXEC || ehdr.e_type == ET_REL || in elf__needs_adjust_symbols()
1320 ss->ehdr = ehdr; in symsrc__init()
1564 ehdr = syms_ss->ehdr; in dso__load_sym_internal()
2027 ehdr = gelf_getehdr(kcore->elf, &kcore->ehdr); in kcore__open()
2028 if (!ehdr) in kcore__open()
[all …]
A Dgenelf.c171 Elf_Ehdr *ehdr; in jit_write_elf() local
193 ehdr = elf_newehdr(e); in jit_write_elf()
194 if (!ehdr) { in jit_write_elf()
199 ehdr->e_ident[EI_DATA] = GEN_ELF_ENDIAN; in jit_write_elf()
200 ehdr->e_ident[EI_CLASS] = GEN_ELF_CLASS; in jit_write_elf()
201 ehdr->e_machine = GEN_ELF_ARCH; in jit_write_elf()
202 ehdr->e_type = ET_DYN; in jit_write_elf()
203 ehdr->e_entry = GEN_ELF_TEXT_OFFSET; in jit_write_elf()
204 ehdr->e_version = EV_CURRENT; in jit_write_elf()
205 ehdr->e_shstrndx= unwinding ? 4 : 2; /* shdr index for section name */ in jit_write_elf()
A Dsymbol-minimal.c296 Elf64_Ehdr ehdr; in dso__type_fd() local
306 if (readn(fd, &ehdr, sizeof(ehdr)) != sizeof(ehdr)) in dso__type_fd()
309 if (ehdr.e_machine == EM_X86_64) in dso__type_fd()
A Dsymsrc.h22 GElf_Ehdr ehdr; member
A Dunwind-libunwind-local.c175 GElf_Ehdr ehdr; in elf_section_address_and_offset() local
183 if (gelf_getehdr(elf, &ehdr) == NULL) in elf_section_address_and_offset()
186 if (!elf_section_by_name(elf, &ehdr, &shdr, name, NULL)) in elf_section_address_and_offset()
235 GElf_Ehdr ehdr; in elf_is_exec() local
241 if (gelf_getehdr(elf, &ehdr) == NULL) in elf_is_exec()
244 retval = (ehdr.e_type == ET_EXEC); in elf_is_exec()
A Dsymbol.h220 bool elf__needs_adjust_symbols(GElf_Ehdr ehdr);
A Dprobe-finder.c1139 GElf_Ehdr ehdr; in debuginfo__find_probes() local
1149 if (gelf_getehdr(elf, &ehdr) == NULL) in debuginfo__find_probes()
1152 pf->e_machine = ehdr.e_machine; in debuginfo__find_probes()
1153 pf->e_flags = ehdr.e_flags; in debuginfo__find_probes()
1158 if (elf_section_by_name(elf, &ehdr, &shdr, ".eh_frame", NULL) && in debuginfo__find_probes()
A Dprobe-event.c302 GElf_Ehdr ehdr; in find_module_name() local
317 if (gelf_getehdr(elf, &ehdr) == NULL) in find_module_name()
320 sec = elf_section_by_name(elf, &ehdr, &shdr, in find_module_name()
338 if (ehdr.e_ident[EI_CLASS] == ELFCLASS32) in find_module_name()
627 GElf_Ehdr ehdr; in get_text_start_address() local
644 if (gelf_getehdr(elf, &ehdr) == NULL) in get_text_start_address()
647 if (!elf_section_by_name(elf, &ehdr, &shdr, ".text", NULL)) in get_text_start_address()
/tools/testing/selftests/powerpc/ptrace/
A Dcore-pkey.c173 void *p = ehdr, *note; in check_core_file()
176 ret = memcmp(ehdr->e_ident, ELFMAG, SELFMAG); in check_core_file()
179 FAIL_IF(ehdr->e_type != ET_CORE); in check_core_file()
180 FAIL_IF(ehdr->e_machine != EM_PPC64); in check_core_file()
181 FAIL_IF(ehdr->e_phoff == 0 || ehdr->e_phnum == 0); in check_core_file()
187 phdr_size = sizeof(*phdr) * ehdr->e_phnum; in check_core_file()
190 FAIL_IF(ehdr->e_phoff + phdr_size < ehdr->e_phoff); in check_core_file()
191 FAIL_IF(ehdr->e_phoff + phdr_size > core_size); in check_core_file()
194 for (phdr = p + ehdr->e_phoff; in check_core_file()
195 (void *) phdr < p + ehdr->e_phoff + phdr_size; in check_core_file()
[all …]
/tools/testing/selftests/sgx/
A Dload.c142 Elf64_Ehdr *ehdr; in encl_get_entry() local
146 ehdr = encl->bin; in encl_get_entry()
147 sections = encl->bin + ehdr->e_shoff; in encl_get_entry()
149 for (i = 0; i < ehdr->e_shnum; i++) { in encl_get_entry()
157 for (i = 0; i < ehdr->e_shnum; i++) { in encl_get_entry()
183 Elf64_Ehdr *ehdr; in encl_load() local
229 ehdr = encl->bin; in encl_load()
230 phdr_tbl = encl->bin + ehdr->e_phoff; in encl_load()
234 for (i = 0; i < ehdr->e_phnum; i++) { in encl_load()
246 for (i = 0, j = 0; i < ehdr->e_phnum; i++) { in encl_load()
A Dmain.c48 Elf64_Ehdr *ehdr = addr; in vdso_get_dyntab() local
49 Elf64_Phdr *phdrtab = addr + ehdr->e_phoff; in vdso_get_dyntab()
52 for (i = 0; i < ehdr->e_phnum; i++) in vdso_get_dyntab()
/tools/objtool/include/objtool/
A Dendianness.h18 (elf->ehdr.e_ident[EI_DATA] == ELFDATA2LSB); in need_bswap()
A Delf.h87 GElf_Ehdr ehdr; member
162 return elf->ehdr.e_ident[EI_CLASS] == ELFCLASS32 ? 4 : 8; in elf_addr_size()
/tools/objtool/
A Dorc_dump.c47 memcpy(&dummy_elf.ehdr, elf64_getehdr(elf), sizeof(dummy_elf.ehdr)); in orc_dump()
A Delf.c1060 if (!gelf_getehdr(elf->elf, &elf->ehdr)) { in elf_open_read()
/tools/lib/bpf/
A Delf.c102 GElf_Ehdr ehdr; in elf_sym_iter_new() local
107 if (!gelf_getehdr(elf, &ehdr)) { in elf_sym_iter_new()
284 GElf_Ehdr ehdr; in elf_find_func_offset() local
286 if (!gelf_getehdr(elf, &ehdr)) { in elf_find_func_offset()
292 is_shared_lib = ehdr.e_type == ET_DYN; in elf_find_func_offset()
A Dusdt.c308 GElf_Ehdr ehdr; in sanity_check_usdt_elf() local
334 if (!gelf_getehdr(elf, &ehdr)) in sanity_check_usdt_elf()
337 if (ehdr.e_type != ET_EXEC && ehdr.e_type != ET_DYN) { in sanity_check_usdt_elf()
339 path, ehdr.e_type); in sanity_check_usdt_elf()
350 if (endianness != ehdr.e_ident[EI_DATA]) { in sanity_check_usdt_elf()
589 GElf_Ehdr ehdr; in collect_usdt_targets() local
603 if (notes_shdr.sh_type != SHT_NOTE || !gelf_getehdr(elf, &ehdr)) { in collect_usdt_targets()
689 if (ehdr.e_type == ET_DYN && !man->has_bpf_cookie) { in collect_usdt_targets()
731 usdt_provider, usdt_name, ehdr.e_type == ET_EXEC ? "exec" : "lib ", path, in collect_usdt_targets()
762 usdt_provider, usdt_name, ehdr.e_type == ET_EXEC ? "exec" : "lib ", in collect_usdt_targets()
A Dlinker.c671 Elf64_Ehdr *ehdr; in linker_load_obj_file() local
693 ehdr = elf64_getehdr(obj->elf); in linker_load_obj_file()
694 if (!ehdr) { in linker_load_obj_file()
700 obj_byteorder = ehdr->e_ident[EI_DATA]; in linker_load_obj_file()
717 if (ehdr->e_type != ET_REL in linker_load_obj_file()
718 || ehdr->e_machine != EM_BPF in linker_load_obj_file()
719 || ehdr->e_ident[EI_CLASS] != ELFCLASS64) { in linker_load_obj_file()
A Dlibbpf.c658 Elf64_Ehdr *ehdr; member
1535 obj->efile.ehdr = NULL; in bpf_object__elf_finish()
1548 Elf64_Ehdr *ehdr; in bpf_object__elf_init() local
1591 obj->efile.ehdr = ehdr = elf64_getehdr(elf); in bpf_object__elf_init()
1592 if (!obj->efile.ehdr) { in bpf_object__elf_init()
1624 if (ehdr->e_type != ET_REL || (ehdr->e_machine && ehdr->e_machine != EM_BPF)) { in bpf_object__elf_init()
13231 struct perf_event_header *ehdr;
13236 ehdr_size = ehdr->size;
13239 void *copy_start = ehdr;
13256 ehdr = *copy_mem;
[all …]
/tools/testing/selftests/bpf/benchs/
A Dbench_ringbufs.c482 struct perf_event_header *ehdr; in perfbuf_custom_consumer() local
505 ehdr = base + (data_tail & mmap_mask); in perfbuf_custom_consumer()
506 ehdr_size = ehdr->size; in perfbuf_custom_consumer()
508 if (ehdr->type == PERF_RECORD_SAMPLE) in perfbuf_custom_consumer()
/tools/testing/selftests/bpf/
A Dtrace_helpers.c437 GElf_Ehdr ehdr; in read_build_id() local
454 if (!gelf_getehdr(elf, &ehdr)) in read_build_id()
457 for (i = 0; i < ehdr.e_phnum; i++) { in read_build_id()
A Dveristat.c466 Elf64_Ehdr *ehdr; in is_bpf_obj_file() local
484 ehdr = elf64_getehdr(elf); in is_bpf_obj_file()
486 if (!ehdr || ehdr->e_type != ET_REL || (ehdr->e_machine && ehdr->e_machine != EM_BPF)) in is_bpf_obj_file()
/tools/objtool/arch/loongarch/
A Ddecode.c63 if (elf->ehdr.e_machine == EM_LOONGARCH) in is_loongarch()
66 ERROR("unexpected ELF machine type %d", elf->ehdr.e_machine); in is_loongarch()
/tools/bpf/resolve_btfids/
A Dmain.c333 GElf_Ehdr ehdr; in elf_collect() local
365 if (gelf_getehdr(obj->efile.elf, &ehdr) == NULL) { in elf_collect()
370 obj->efile.encoding = ehdr.e_ident[EI_DATA]; in elf_collect()
/tools/objtool/arch/x86/
A Ddecode.c33 switch (elf->ehdr.e_machine) { in is_x86_64()
39 ERROR("unexpected ELF machine type %d", elf->ehdr.e_machine); in is_x86_64()

Completed in 89 milliseconds

12