Home
last modified time | relevance | path

Searched refs:phnum (Results 1 – 25 of 50) sorted by relevance

12

/external/elfutils/libdwfl/
Delf-from-memory.c123 uint_fast16_t phnum; in elf_from_remote_memory() local
138 phnum = ehdr.e32.e_phnum; in elf_from_remote_memory()
140 if (phentsize != sizeof (Elf32_Phdr) || phnum == 0) in elf_from_remote_memory()
155 phnum = ehdr.e64.e_phnum; in elf_from_remote_memory()
157 if (phentsize != sizeof (Elf64_Phdr) || phnum == 0) in elf_from_remote_memory()
172 xlatefrom.d_size = phnum * phentsize; in elf_from_remote_memory()
174 if ((size_t) nread >= phoff + phnum * phentsize) in elf_from_remote_memory()
181 if (initial_bufsize < (size_t)phnum * phentsize) in elf_from_remote_memory()
183 unsigned char *newbuf = realloc (buffer, phnum * phentsize); in elf_from_remote_memory()
193 phnum * phentsize, phnum * phentsize); in elf_from_remote_memory()
[all …]
Ddwfl_module_getdwarf.c128 size_t phnum; in open_elf() local
129 if (unlikely (elf_getphdrnum (file->elf, &phnum) != 0)) in open_elf()
133 for (size_t i = 0; i < phnum; ++i) in open_elf()
335 uint_fast16_t phnum; in find_prelink_address_sync() local
342 phnum = ehdr.e32.e_phnum; in find_prelink_address_sync()
350 phnum = ehdr.e64.e_phnum; in find_prelink_address_sync()
358 + phnum * phentsize in find_prelink_address_sync()
392 src.d_size = phnum * phentsize; in find_prelink_address_sync()
398 if (unlikely (phnum > SIZE_MAX / phdr_size)) in find_prelink_address_sync()
400 const size_t phdrs_bytes = phnum * phdr_size; in find_prelink_address_sync()
[all …]
Dlink_map.c564 size_t phnum; in consider_executable() local
565 if (elf_getphdrnum (mod->main.elf, &phnum) != 0) in consider_executable()
568 for (size_t i = 0; i < phnum; ++i) in consider_executable()
733 GElf_Xword phnum = 0; in dwfl_link_map_report() local
753 phnum = val; \ in dwfl_link_map_report()
787 if (phdr != 0 && phnum != 0) in dwfl_link_map_report()
795 .d_size = phnum * phent, in dwfl_link_map_report()
799 &in.d_size, phdr, phnum * phent, in dwfl_link_map_report()
838 if (e_phnum != phnum || ehdr->e_phentsize != phent) in dwfl_link_map_report()
850 in.d_size = phnum * phent; in dwfl_link_map_report()
[all …]
Dcore-file.c125 dwfl_report_core_segments (Dwfl *dwfl, Elf *elf, size_t phnum, GElf_Phdr *notes) in dwfl_report_core_segments() argument
135 for (size_t ndx = 0; result >= 0 && ndx < phnum; ++ndx) in dwfl_report_core_segments()
425 size_t phnum; in __libdwfl_dynamic_vaddr_get() local
426 if (unlikely (elf_getphdrnum (elf, &phnum) != 0)) in __libdwfl_dynamic_vaddr_get()
428 for (size_t i = 0; i < phnum; ++i) in __libdwfl_dynamic_vaddr_get()
446 size_t phnum; in dwfl_core_file_report() local
447 if (unlikely (elf_getphdrnum (elf, &phnum) != 0)) in dwfl_core_file_report()
489 int ndx = dwfl_report_core_segments (dwfl, elf, phnum, &notes_phdr); in dwfl_core_file_report()
576 while (ndx < (int) phnum); in dwfl_core_file_report()
Dlinux-core-attach.c61 static size_t phnum; in core_memory_read() local
62 if (elf_getphdrnum (core, &phnum) < 0) in core_memory_read()
67 for (size_t cnt = 0; cnt < phnum; ++cnt) in core_memory_read()
346 size_t phnum; in dwfl_core_file_attach() local
347 if (elf_getphdrnum (core, &phnum) < 0) in dwfl_core_file_attach()
354 for (size_t cnt = 0; cnt < phnum; ++cnt) in dwfl_core_file_attach()
Ddwfl_segment_report_module.c350 uint_fast16_t phnum; in dwfl_segment_report_module() local
377 phnum = ehdr.e32.e_phnum; in dwfl_segment_report_module()
395 phnum = ehdr.e64.e_phnum; in dwfl_segment_report_module()
411 if (phnum == 0) in dwfl_segment_report_module()
415 xlatefrom.d_size = phnum * phentsize; in dwfl_segment_report_module()
434 if (unlikely (phnum > SIZE_MAX / phdr_size)) in dwfl_segment_report_module()
436 const size_t phdrsp_bytes = phnum * phdr_size; in dwfl_segment_report_module()
481 for (uint_fast16_t i = 0; i < phnum; ++i) in dwfl_segment_report_module()
621 && likely (filesz_offset >= phoff + phnum * phentsize)) in dwfl_segment_report_module()
915 for (uint_fast16_t i = 0; i < phnum; ++i) in dwfl_segment_report_module()
Ddwfl_report_elf.c180 size_t phnum; in __libdwfl_elf_address_range() local
181 if (unlikely (elf_getphdrnum (elf, &phnum) != 0)) in __libdwfl_elf_address_range()
183 for (size_t i = 0; i < phnum; ++i) in __libdwfl_elf_address_range()
206 for (size_t i = phnum; i-- > 0;) in __libdwfl_elf_address_range()
/external/elfutils/libelf/
Dgelf_getphdr.c79 size_t phnum; in gelf_getphdr() local
80 if (__elf_getphdrnum_chk_rdlock (elf, &phnum) != 0 in gelf_getphdr()
81 || (size_t) ndx >= phnum) in gelf_getphdr()
119 size_t phnum; in gelf_getphdr() local
120 if (__elf_getphdrnum_chk_rdlock (elf, &phnum) != 0 in gelf_getphdr()
121 || (size_t) ndx >= phnum) in gelf_getphdr()
Dgelf_update_phdr.c83 size_t phnum; in gelf_update_phdr() local
86 || __elf_getphdrnum_rdlock (elf, &phnum) != 0 in gelf_update_phdr()
87 || (size_t) ndx >= phnum)) in gelf_update_phdr()
120 size_t phnum; in gelf_update_phdr() local
123 || __elf_getphdrnum_rdlock (elf, &phnum) != 0 in gelf_update_phdr()
124 || (size_t) ndx >= phnum)) in gelf_update_phdr()
Dgelf_newphdr.c41 gelf_newphdr ( Elf *elf, size_t phnum) in gelf_newphdr() argument
44 ? (void *) INTUSE(elf32_newphdr) (elf, phnum) in gelf_newphdr()
45 : (void *) INTUSE(elf64_newphdr) (elf, phnum)); in gelf_newphdr()
Delf32_getphdr.c75 size_t phnum; in ElfW2() local
76 if (__elf_getphdrnum_rdlock (elf, &phnum) != 0) in ElfW2()
78 if (phnum == 0 || ehdr->e_phoff == 0) in ElfW2()
85 size_t size = phnum * sizeof (ElfW2(LIBELFBITS,Phdr)); in ElfW2()
87 if (phnum > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Phdr)) in ElfW2()
160 for (size_t cnt = 0; cnt < phnum; ++cnt) in ElfW2()
210 for (size_t cnt = 0; cnt < phnum; ++cnt) in ElfW2()
Delf32_updatefile.c164 size_t phnum; in __elfw2() local
165 if (unlikely (__elf_getphdrnum_rdlock (elf, &phnum) != 0)) in __elfw2()
193 sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum, 1); in __elfw2()
198 sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum); in __elfw2()
212 + elf_typesize (LIBELFBITS, ELF_T_PHDR, phnum)); in __elfw2()
589 size_t phnum; in __elfw2() local
590 if (unlikely (__elf_getphdrnum_rdlock (elf, &phnum) != 0)) in __elfw2()
617 malloc (sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum); in __elfw2()
626 sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum, 1); in __elfw2()
633 size_t phdr_size = sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum; in __elfw2()
[all …]
/external/llvm-project/compiler-rt/lib/hwasan/
Dhwasan_globals.cpp28 ElfW(Half) phnum) { in CheckCodeModel()
30 for (unsigned i = 0; i != phnum; ++i) { in CheckCodeModel()
52 ElfW(Half) phnum) { in HwasanGlobalsFor()
54 for (unsigned i = 0; i != phnum; ++i) { in HwasanGlobalsFor()
76 CheckCodeModel(base, phdr, phnum); in HwasanGlobalsFor()
Dhwasan.cpp315 ElfW(Half) phnum) { in __hwasan_library_loaded()
316 for (const hwasan_global &global : HwasanGlobalsFor(base, phdr, phnum)) in __hwasan_library_loaded()
321 ElfW(Half) phnum) { in __hwasan_library_unloaded()
322 for (; phnum != 0; ++phdr, --phnum) in __hwasan_library_unloaded()
/external/elfutils/tests/
Delfshphehdr.c79 size_t phnum; in test() local
80 check_elf ("elf_getphdrnum", elf_getphdrnum (elf, &phnum) == 0); in test()
81 check ("phnum == 0", phnum == 0); in test()
105 check_elf ("elf_getphdrnum", elf_getphdrnum (elf, &phnum) == 0); in test()
106 check ("phnum == 0", phnum == 0); in test()
129 check_elf ("elf_getphdrnum", elf_getphdrnum (elf, &phnum) == 0); in test()
130 check ("phnum == 1", phnum == 1); in test()
Dgetphdrnum.c15 size_t phnum; in main() local
36 if (elf_getphdrnum (elf, &phnum)) in main()
42 printf("%zu\n", phnum); in main()
Delfcopy.c154 size_t phnum; in copy_elf() local
155 if (elf_getphdrnum (elfa, &phnum) != 0) in copy_elf()
161 if (phnum > 0) in copy_elf()
163 if (gelf_newphdr (elfb, phnum) == 0) in copy_elf()
169 for (size_t cnt = 0; cnt < phnum; ++cnt) in copy_elf()
229 && (phnum == 0 in copy_elf()
304 if (phnum > 0 || reverse_offs) in copy_elf()
Delfrdwrnop.c71 size_t phnum; in main() local
72 if (elf_getphdrnum (elf, &phnum) != 0) in main()
78 if (phnum > 0) in main()
Dvendorelf.c143 size_t phnum; in check_elf() local
144 if (elf_getphdrnum (elf, &phnum) != 0) in check_elf()
150 if (phnum != 1) in check_elf()
152 printf ("Expected just 1 phdr, got: %zd\n", phnum); in check_elf()
Delfstrmerge.c236 size_t phnum; in main() local
237 if (elf_getphdrnum (elf, &phnum) != 0) in main()
242 bool layout = phnum != 0; in main()
264 + gelf_fsize (elf, ELF_T_PHDR, phnum, EV_CURRENT)); in main()
415 if (phnum != 0) in main()
417 if (gelf_newphdr (elfnew, phnum) == 0) in main()
420 for (size_t cnt = 0; cnt < phnum; ++cnt) in main()
/external/elfutils/backends/
Dppc_symbol.c100 size_t phnum; in find_dyn_got() local
101 if (elf_getphdrnum (elf, &phnum) != 0) in find_dyn_got()
104 for (size_t i = 0; i < phnum; ++i) in find_dyn_got()
/external/elfutils/libdwelf/
Ddwelf_elf_gnu_build_id.c76 size_t phnum; in find_elf_build_id() local
77 if (unlikely (elf_getphdrnum (elf, &phnum) != 0)) in find_elf_build_id()
83 for (size_t i = 0; result == 0 && i < phnum; ++i) in find_elf_build_id()
/external/bcc/src/lua/bpf/
Delf.lua193 local phnum = ffi.new('size_t [1]')
194 if elf.elf_getphdrnum(t.elf, phnum) == nil then
198 for i = 0, tonumber(phnum[0])-1 do
/external/toybox/toys/pending/
Dreadelf.c351 int type, machine, version, flags, entry, ehsize, phnum, shstrndx, i, j, w; in scan_elf() local
375 phnum = elf_short(&hdr); in scan_elf()
403 printf(" Number of program headers: %d\n", phnum); in scan_elf()
473 if (!phnum) printf("There are no program headers in this file.\n"); in scan_elf()
480 et_type(type), entry, phnum, TT.phoff); in scan_elf()
485 for (i=0; i<phnum; i++) { in scan_elf()
501 for (i=0; i<phnum; i++) { in scan_elf()
584 for (i=0; !found && i<phnum; i++) { in scan_elf()
/external/toybox/toys/posix/
Dfile.c37 phentsize, phnum, shsize, shnum; local
89 phnum = elf_int(toybuf+44+12*bits, 2);
97 if (phnum && (phentsize != 32+24*bits)) {
110 if (phoff<0 || phoff>TT.len || phnum*phentsize>TT.len-phoff) goto bad;
111 for (i = 0; i<phnum; i++) {

12