Home
last modified time | relevance | path

Searched refs:phnum (Results 1 – 25 of 44) 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 …]
Dlink_map.c538 size_t phnum; in consider_executable() local
539 if (elf_getphdrnum (mod->main.elf, &phnum) != 0) in consider_executable()
542 for (size_t i = 0; i < phnum; ++i) in consider_executable()
707 GElf_Xword phnum = 0; in dwfl_link_map_report() local
727 phnum = val; \ in dwfl_link_map_report()
786 if (phdr != 0 && phnum != 0) in dwfl_link_map_report()
794 .d_size = phnum * phent, in dwfl_link_map_report()
798 &in.d_size, phdr, phnum * phent, in dwfl_link_map_report()
837 if (e_phnum != phnum || ehdr->e_phentsize != phent) in dwfl_link_map_report()
849 in.d_size = phnum * phent; in dwfl_link_map_report()
[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 …]
Ddwfl_segment_report_module.c342 uint_fast16_t phnum; in dwfl_segment_report_module() local
369 phnum = ehdr.e32.e_phnum; in dwfl_segment_report_module()
387 phnum = ehdr.e64.e_phnum; in dwfl_segment_report_module()
403 if (phnum == 0) in dwfl_segment_report_module()
407 xlatefrom.d_size = phnum * phentsize; in dwfl_segment_report_module()
419 if (unlikely (phnum > SIZE_MAX / phdr_size)) in dwfl_segment_report_module()
421 const size_t phdrsp_bytes = phnum * phdr_size; in dwfl_segment_report_module()
585 && likely (filesz_offset >= phoff + phnum * phentsize)) in dwfl_segment_report_module()
603 Elf32_Phdr (*p32)[phnum] = phdrsp; in dwfl_segment_report_module()
604 Elf64_Phdr (*p64)[phnum] = phdrsp; in dwfl_segment_report_module()
[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()
482 int ndx = dwfl_report_core_segments (dwfl, elf, phnum, &notes_phdr); in dwfl_core_file_report()
561 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()
345 size_t phnum; in dwfl_core_file_attach() local
346 if (elf_getphdrnum (core, &phnum) < 0) in dwfl_core_file_attach()
353 for (size_t cnt = 0; cnt < phnum; ++cnt) in dwfl_core_file_attach()
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()
574 size_t phnum; in __elfw2() local
575 if (unlikely (__elf_getphdrnum_rdlock (elf, &phnum) != 0)) in __elfw2()
602 malloc (sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum); in __elfw2()
611 sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum, 1); in __elfw2()
618 size_t phdr_size = sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum; in __elfw2()
[all …]
Delf32_updatenull.c147 size_t phnum; in __elfw2() local
148 if (unlikely (__elf_getphdrnum_rdlock (elf, &phnum) != 0)) in __elfw2()
157 + elf_typesize (LIBELFBITS, ELF_T_PHDR, phnum)); in __elfw2()
166 size += elf_typesize (LIBELFBITS, ELF_T_PHDR, phnum); in __elfw2()
/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()
Delfcopy.c152 size_t phnum; in copy_elf() local
153 if (elf_getphdrnum (elfa, &phnum) != 0) in copy_elf()
159 if (phnum > 0) in copy_elf()
161 if (gelf_newphdr (elfb, phnum) == 0) in copy_elf()
167 for (size_t cnt = 0; cnt < phnum; ++cnt) in copy_elf()
228 if (phnum > 0) in copy_elf()
Dvendorelf.c142 size_t phnum; in check_elf() local
143 if (elf_getphdrnum (elf, &phnum) != 0) in check_elf()
149 if (phnum != 1) in check_elf()
151 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/posix/
Dfile.c35 phentsize, phnum, shsize, shnum; local
105 phnum = elf_int(toybuf+44+12*bits, 2);
113 if (phnum && (phentsize != 32+24*bits)) {
126 if (phoff+phnum*phentsize>TT.len) goto bad;
127 for (i = 0; i<phnum; i++) {
/external/elfutils/src/
Dunstrip.c267 size_t phnum; in copy_elf() local
268 ELF_CHECK (elf_getphdrnum (inelf, &phnum) == 0, in copy_elf()
271 if (phnum > 0) in copy_elf()
273 ELF_CHECK (gelf_newphdr (outelf, phnum), in copy_elf()
277 for (size_t i = 0; i < phnum; ++i) in copy_elf()
1109 uint_fast16_t phnum; in find_alloc_sections_prelink() local
1113 phnum = ehdr.e32.e_phnum; in find_alloc_sections_prelink()
1118 phnum = ehdr.e64.e_phnum; in find_alloc_sections_prelink()
1130 size_t phsize = gelf_fsize (main, ELF_T_PHDR, phnum, EV_CURRENT); in find_alloc_sections_prelink()
2050 size_t phnum; in copy_elided_sections() local
[all …]
Delfcompress.c398 size_t phnum; in process_file() local
399 if (elf_getphdrnum (elf, &phnum) != 0) in process_file()
412 bool layout = phnum != 0; in process_file()
421 + gelf_fsize (elf, ELF_T_PHDR, phnum, EV_CURRENT)); in process_file()
632 if (phnum != 0) in process_file()
634 if (gelf_newphdr (elfnew, phnum) == 0) in process_file()
640 for (size_t cnt = 0; cnt < phnum; ++cnt) in process_file()
Delflint.c127 static unsigned int phnum; variable
476 phnum = ehdr->e_phnum; in check_elf_header()
490 phnum = shdr->sh_info; in check_elf_header()
496 for (pcnt = 0; pcnt < phnum; ++pcnt) in check_elf_header()
503 if (pcnt < phnum) in check_elf_header()
504 ERROR (gettext ("Can only check %u headers, phnum was %u\n"), pcnt, phnum); in check_elf_header()
505 phnum = pcnt; in check_elf_header()
521 else if (ehdr->e_phoff + phnum * ehdr->e_phentsize > size) in check_elf_header()
538 else if (ehdr->e_phoff + phnum * ehdr->e_phentsize > size) in check_elf_header()
870 for (pcnt = 0; pcnt < phnum; ++pcnt) in check_symtab()
[all …]
/external/elfutils/libdw/
Ddwarf_getcfi_elf.c196 size_t phnum; in getcfi_phdr() local
197 if (unlikely (elf_getphdrnum (elf, &phnum) != 0)) in getcfi_phdr()
200 for (size_t i = 0; i < phnum; ++i) in getcfi_phdr()

12