/external/elfutils/libdwfl/ |
D | elf-from-memory.c | 123 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() 150 phnum = ehdr.e64.e_phnum; in elf_from_remote_memory() 152 if (phentsize != sizeof (Elf64_Phdr) || phnum == 0) in elf_from_remote_memory() 166 xlatefrom.d_size = phnum * phentsize; in elf_from_remote_memory() 168 if ((size_t) nread >= phoff + phnum * phentsize) in elf_from_remote_memory() 175 if (initial_bufsize < phnum * phentsize) in elf_from_remote_memory() 177 unsigned char *newbuf = realloc (buffer, phnum * phentsize); in elf_from_remote_memory() 187 phnum * phentsize, phnum * phentsize); in elf_from_remote_memory() [all …]
|
D | link_map.c | 542 size_t phnum; in consider_executable() local 543 if (elf_getphdrnum (mod->main.elf, &phnum) != 0) in consider_executable() 546 for (size_t i = 0; i < phnum; ++i) in consider_executable() 711 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() 846 assert (in.d_size == phnum * phent); in dwfl_link_map_report() [all …]
|
D | dwfl_module_getdwarf.c | 123 size_t phnum; in open_elf() local 124 if (unlikely (elf_getphdrnum (file->elf, &phnum) != 0)) in open_elf() 128 for (size_t i = 0; i < phnum; ++i) in open_elf() 330 uint_fast16_t phnum; in find_prelink_address_sync() local 337 phnum = ehdr.e32.e_phnum; in find_prelink_address_sync() 345 phnum = ehdr.e64.e_phnum; in find_prelink_address_sync() 353 + phnum * phentsize in find_prelink_address_sync() 385 src.d_size = phnum * phentsize; in find_prelink_address_sync() 391 if (unlikely (phnum > SIZE_MAX / phdr_size)) in find_prelink_address_sync() 393 const size_t phdrs_bytes = phnum * phdr_size; in find_prelink_address_sync() [all …]
|
D | dwfl_segment_report_module.c | 342 uint_fast16_t phnum; in dwfl_segment_report_module() local 369 phnum = ehdr.e32.e_phnum; in dwfl_segment_report_module() 382 phnum = ehdr.e64.e_phnum; in dwfl_segment_report_module() 397 if (phnum == 0) in dwfl_segment_report_module() 401 xlatefrom.d_size = phnum * phentsize; in dwfl_segment_report_module() 413 if (unlikely (phnum > SIZE_MAX / phdr_size)) in dwfl_segment_report_module() 415 const size_t phdrsp_bytes = phnum * phdr_size; in dwfl_segment_report_module() 561 && likely (filesz_offset >= phoff + phnum * phentsize)) in dwfl_segment_report_module() 579 Elf32_Phdr (*p32)[phnum] = phdrsp; in dwfl_segment_report_module() 580 Elf64_Phdr (*p64)[phnum] = phdrsp; in dwfl_segment_report_module() [all …]
|
D | core-file.c | 126 dwfl_report_core_segments (Dwfl *dwfl, Elf *elf, size_t phnum, GElf_Phdr *notes) in dwfl_report_core_segments() argument 136 for (size_t ndx = 0; result >= 0 && ndx < phnum; ++ndx) in dwfl_report_core_segments() 426 size_t phnum; in __libdwfl_dynamic_vaddr_get() local 427 if (unlikely (elf_getphdrnum (elf, &phnum) != 0)) in __libdwfl_dynamic_vaddr_get() 429 for (size_t i = 0; i < phnum; ++i) in __libdwfl_dynamic_vaddr_get() 447 size_t phnum; in dwfl_core_file_report() local 448 if (unlikely (elf_getphdrnum (elf, &phnum) != 0)) in dwfl_core_file_report() 483 int ndx = dwfl_report_core_segments (dwfl, elf, phnum, ¬es_phdr); in dwfl_core_file_report() 560 while (ndx < (int) phnum); in dwfl_core_file_report()
|
D | linux-core-attach.c | 61 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() 342 size_t phnum; in dwfl_core_file_attach() local 343 if (elf_getphdrnum (core, &phnum) < 0) in dwfl_core_file_attach() 350 for (size_t cnt = 0; cnt < phnum; ++cnt) in dwfl_core_file_attach()
|
D | dwfl_report_elf.c | 176 size_t phnum; in __libdwfl_elf_address_range() local 177 if (unlikely (elf_getphdrnum (elf, &phnum) != 0)) in __libdwfl_elf_address_range() 179 for (size_t i = 0; i < phnum; ++i) in __libdwfl_elf_address_range() 202 for (size_t i = phnum; i-- > 0;) in __libdwfl_elf_address_range()
|
/external/elfutils/libelf/ |
D | gelf_getphdr.c | 79 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()
|
D | gelf_update_phdr.c | 83 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()
|
D | gelf_newphdr.c | 41 gelf_newphdr ( Elf *elf, size_t phnum) in gelf_newphdr() argument 44 ? (unsigned long int) INTUSE(elf32_newphdr) (elf, phnum) in gelf_newphdr() 45 : (unsigned long int) INTUSE(elf64_newphdr) (elf, phnum)); in gelf_newphdr()
|
D | elf32_getphdr.c | 75 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()
|
D | elf32_updatefile.c | 170 size_t phnum; in __elfw2() local 171 if (unlikely (__elf_getphdrnum_rdlock (elf, &phnum) != 0)) in __elfw2() 204 sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum, 1); in __elfw2() 209 sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum); in __elfw2() 223 + elf_typesize (LIBELFBITS, ELF_T_PHDR, phnum)); in __elfw2() 570 size_t phnum; in __elfw2() local 571 if (unlikely (__elf_getphdrnum_rdlock (elf, &phnum) != 0)) in __elfw2() 603 malloc (sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum); in __elfw2() 612 sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum, 1); in __elfw2() 619 size_t phdr_size = sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum; in __elfw2() [all …]
|
D | elf32_updatenull.c | 158 size_t phnum; in __elfw2() local 159 if (unlikely (__elf_getphdrnum_rdlock (elf, &phnum) != 0)) in __elfw2() 168 + elf_typesize (LIBELFBITS, ELF_T_PHDR, phnum)); in __elfw2() 177 size += elf_typesize (LIBELFBITS, ELF_T_PHDR, phnum); in __elfw2()
|
/external/elfutils/tests/ |
D | elfshphehdr.c | 79 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()
|
D | elfstrmerge.c | 235 size_t phnum; in main() local 236 if (elf_getphdrnum (elf, &phnum) != 0) in main() 241 bool layout = phnum != 0; in main() 263 + gelf_fsize (elf, ELF_T_PHDR, phnum, EV_CURRENT)); in main() 414 if (phnum != 0) in main() 416 if (gelf_newphdr (elfnew, phnum) == 0) in main() 419 for (size_t cnt = 0; cnt < phnum; ++cnt) in main()
|
/external/elfutils/backends/ |
D | ppc_symbol.c | 86 size_t phnum; in find_dyn_got() local 87 if (elf_getphdrnum (elf, &phnum) != 0) in find_dyn_got() 90 for (size_t i = 0; i < phnum; ++i) in find_dyn_got()
|
/external/toybox/toys/pending/ |
D | file.c | 84 int phsize = i, phnum = elf_int(toybuf+44+12*bits, 2), local 90 map = mmap(0, phsize*phnum, PROT_READ, MAP_SHARED, fd, mapoff); 93 for (i = 0; i<phnum; i++) { 112 munmap(map, phsize*phnum);
|
/external/elfutils/libdwelf/ |
D | dwelf_elf_gnu_build_id.c | 76 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/elfutils/libdw/ |
D | dwarf_getcfi_elf.c | 196 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()
|
/external/elfutils/src/ |
D | unstrip.c | 259 size_t phnum; in copy_elf() local 260 ELF_CHECK (elf_getphdrnum (inelf, &phnum) == 0, in copy_elf() 263 if (phnum > 0) in copy_elf() 265 ELF_CHECK (gelf_newphdr (outelf, phnum), in copy_elf() 269 for (size_t i = 0; i < phnum; ++i) in copy_elf() 1029 uint_fast16_t phnum; in find_alloc_sections_prelink() local 1033 phnum = ehdr.e32.e_phnum; in find_alloc_sections_prelink() 1038 phnum = ehdr.e64.e_phnum; in find_alloc_sections_prelink() 1042 size_t phsize = gelf_fsize (main, ELF_T_PHDR, phnum, EV_CURRENT); in find_alloc_sections_prelink() 1937 size_t phnum; in copy_elided_sections() local [all …]
|
D | elfcompress.c | 392 size_t phnum; in process_file() local 393 if (elf_getphdrnum (elf, &phnum) != 0) in process_file() 406 bool layout = phnum != 0; in process_file() 415 + gelf_fsize (elf, ELF_T_PHDR, phnum, EV_CURRENT)); in process_file() 596 if (phnum != 0) in process_file() 598 if (gelf_newphdr (elfnew, phnum) == 0) in process_file() 604 for (size_t cnt = 0; cnt < phnum; ++cnt) in process_file()
|
D | findtextrel.c | 327 size_t phnum; in process_file() local 328 if (elf_getphdrnum (elf, &phnum) != 0) in process_file() 333 for (size_t i = 0; i < phnum; ++i) in process_file()
|
D | size.c | 599 size_t phnum; in show_segments() local 600 if (elf_getphdrnum (elf, &phnum) != 0) in show_segments() 605 for (size_t cnt = 0; cnt < phnum; ++cnt) in show_segments()
|
D | elflint.c | 128 static unsigned int phnum; variable 472 phnum = ehdr->e_phnum; in check_elf_header() 486 phnum = shdr->sh_info; in check_elf_header() 504 else if (ehdr->e_phoff + phnum * ehdr->e_phentsize > size) in check_elf_header() 521 else if (ehdr->e_phoff + phnum * ehdr->e_phentsize > size) in check_elf_header() 853 for (pcnt = 0; pcnt < phnum; ++pcnt) in check_symtab() 860 if (pcnt == phnum) in check_symtab() 1014 for (unsigned int pcnt = 0; pcnt < phnum; ++pcnt) in check_symtab() 1284 for (unsigned int i = 0; i < phnum; ++i) in check_reloc_shdr() 1768 for (n = 0; n < phnum; ++n) in check_dynamic() [all …]
|
/external/valgrind/coregrind/ |
D | pub_core_ume.h | 56 Int phnum; // OUT: number of phdrs member
|