Searched refs:phnum (Results 1 - 25 of 34) sorted by relevance

12

/external/elfutils/libelf/
H A Dgelf_newphdr.c41 gelf_newphdr ( Elf *elf, size_t phnum) argument
44 ? (unsigned long int) INTUSE(elf32_newphdr) (elf, phnum)
45 : (unsigned long int) INTUSE(elf64_newphdr) (elf, phnum));
H A Dgelf_getphdr.c79 size_t phnum; local
80 if (__elf_getphdrnum_chk_rdlock (elf, &phnum) != 0
81 || (size_t) ndx >= phnum)
119 size_t phnum; local
120 if (__elf_getphdrnum_chk_rdlock (elf, &phnum) != 0
121 || (size_t) ndx >= phnum)
H A Dgelf_update_phdr.c83 size_t phnum; local
86 || __elf_getphdrnum_rdlock (elf, &phnum) != 0
87 || (size_t) ndx >= phnum))
120 size_t phnum; local
123 || __elf_getphdrnum_rdlock (elf, &phnum) != 0
124 || (size_t) ndx >= phnum))
H A Delf32_getphdr.c75 size_t phnum; local
76 if (__elf_getphdrnum_rdlock (elf, &phnum) != 0)
78 if (phnum == 0 || ehdr->e_phoff == 0)
85 size_t size = phnum * sizeof (ElfW2(LIBELFBITS,Phdr));
87 if (phnum > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Phdr))
160 for (size_t cnt = 0; cnt < phnum; ++cnt)
210 for (size_t cnt = 0; cnt < phnum; ++cnt)
H A Delf32_updatefile.c170 size_t phnum; local
171 if (unlikely (__elf_getphdrnum_rdlock (elf, &phnum) != 0))
204 sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum, 1);
209 sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum);
223 + elf_typesize (LIBELFBITS, ELF_T_PHDR, phnum));
570 size_t phnum; local
571 if (unlikely (__elf_getphdrnum_rdlock (elf, &phnum) != 0))
603 malloc (sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum);
612 sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum, 1);
619 size_t phdr_size = sizeof (ElfW2(LIBELFBITS,Phdr)) * phnum;
[all...]
H A Delf32_updatenull.c113 /* If phnum is zero make sure e_phoff is also zero and not some random
158 size_t phnum; local
159 if (unlikely (__elf_getphdrnum_rdlock (elf, &phnum) != 0))
168 + elf_typesize (LIBELFBITS, ELF_T_PHDR, phnum));
177 size += elf_typesize (LIBELFBITS, ELF_T_PHDR, phnum);
/external/elfutils/libdwfl/
H A Delf-from-memory.c123 uint_fast16_t phnum; local
138 phnum = ehdr.e32.e_phnum;
140 if (phentsize != sizeof (Elf32_Phdr) || phnum == 0)
150 phnum = ehdr.e64.e_phnum;
152 if (phentsize != sizeof (Elf64_Phdr) || phnum == 0)
166 xlatefrom.d_size = phnum * phentsize;
168 if ((size_t) nread >= phoff + phnum * phentsize)
175 if (initial_bufsize < phnum * phentsize)
177 unsigned char *newbuf = realloc (buffer, phnum * phentsize);
187 phnum * phentsiz
[all...]
H A Ddwfl_module_getdwarf.c123 size_t phnum; local
124 if (unlikely (elf_getphdrnum (file->elf, &phnum) != 0))
128 for (size_t i = 0; i < phnum; ++i)
330 uint_fast16_t phnum; local
337 phnum = ehdr.e32.e_phnum;
345 phnum = ehdr.e64.e_phnum;
353 + phnum * phentsize
385 src.d_size = phnum * phentsize;
391 if (unlikely (phnum > SIZE_MAX / phdr_size))
393 const size_t phdrs_bytes = phnum * phdr_siz
660 find_offsets(Elf *elf, GElf_Addr main_bias, size_t phnum, size_t n, GElf_Addr addrs[n], GElf_Off offs[n]) argument
696 translate_offs(GElf_Addr adjust, Dwfl_Module *mod, size_t phnum, GElf_Addr addrs[i_max], GElf_Xword strsz, GElf_Ehdr *ehdr) argument
823 size_t phnum; local
[all...]
H A Dlink_map.c545 size_t phnum;
546 if (elf_getphdrnum (mod->main.elf, &phnum) != 0)
549 for (size_t i = 0; i < phnum; ++i)
715 GElf_Xword phnum = 0;
731 phnum = val; \
790 if (phdr != 0 && phnum != 0)
798 .d_size = phnum * phent,
802 &in.d_size, phdr, phnum * phent,
841 if (e_phnum != phnum || ehdr->e_phentsize != phent)
850 assert (in.d_size == phnum * phen
542 size_t phnum; local
711 GElf_Xword phnum = 0; local
[all...]
H A Ddwfl_report_elf.c176 size_t phnum; local
177 if (unlikely (elf_getphdrnum (elf, &phnum) != 0))
179 for (size_t i = 0; i < phnum; ++i)
202 for (size_t i = phnum; i-- > 0;)
H A Dcore-file.c126 dwfl_report_core_segments (Dwfl *dwfl, Elf *elf, size_t phnum, GElf_Phdr *notes) argument
136 for (size_t ndx = 0; result >= 0 && ndx < phnum; ++ndx)
426 size_t phnum; local
427 if (unlikely (elf_getphdrnum (elf, &phnum) != 0))
429 for (size_t i = 0; i < phnum; ++i)
447 size_t phnum; local
448 if (unlikely (elf_getphdrnum (elf, &phnum) != 0))
483 int ndx = dwfl_report_core_segments (dwfl, elf, phnum, &notes_phdr);
560 while (ndx < (int) phnum);
H A Ddwfl_segment_report_module.c342 uint_fast16_t phnum; local
369 phnum = ehdr.e32.e_phnum;
382 phnum = ehdr.e64.e_phnum;
397 if (phnum == 0)
401 xlatefrom.d_size = phnum * phentsize;
413 if (unlikely (phnum > SIZE_MAX / phdr_size))
415 const size_t phdrsp_bytes = phnum * phdr_size;
561 && likely (filesz_offset >= phoff + phnum * phentsize))
579 Elf32_Phdr (*p32)[phnum] = phdrsp;
580 Elf64_Phdr (*p64)[phnum]
[all...]
H A Dlinux-core-attach.c61 static size_t phnum; local
62 if (elf_getphdrnum (core, &phnum) < 0)
67 for (size_t cnt = 0; cnt < phnum; ++cnt)
342 size_t phnum; local
343 if (elf_getphdrnum (core, &phnum) < 0)
350 for (size_t cnt = 0; cnt < phnum; ++cnt)
/external/syslinux/gpxe/src/image/
H A Delf.c125 unsigned int phnum; local
142 for ( phoff = ehdr.e_phoff , phnum = ehdr.e_phnum ; phnum ;
143 phoff += ehdr.e_phentsize, phnum-- ) {
146 "image\n", image, phnum );
/external/elfutils/tests/
H A Delfshphehdr.c79 size_t phnum; local
80 check_elf ("elf_getphdrnum", elf_getphdrnum (elf, &phnum) == 0);
81 check ("phnum == 0", phnum == 0);
105 check_elf ("elf_getphdrnum", elf_getphdrnum (elf, &phnum) == 0);
106 check ("phnum == 0", phnum == 0);
129 check_elf ("elf_getphdrnum", elf_getphdrnum (elf, &phnum) != 0);
130 check ("phnum == 1", phnum
[all...]
H A Delfstrmerge.c235 size_t phnum; local
236 if (elf_getphdrnum (elf, &phnum) != 0)
241 bool layout = phnum != 0;
263 + gelf_fsize (elf, ELF_T_PHDR, phnum, EV_CURRENT));
414 if (phnum != 0)
416 if (gelf_newphdr (elfnew, phnum) == 0)
419 for (size_t cnt = 0; cnt < phnum; ++cnt)
/external/elfutils/backends/
H A Dppc_symbol.c86 size_t phnum; local
87 if (elf_getphdrnum (elf, &phnum) != 0)
90 for (size_t i = 0; i < phnum; ++i)
/external/elfutils/libdwelf/
H A Ddwelf_elf_gnu_build_id.c76 size_t phnum; local
77 if (unlikely (elf_getphdrnum (elf, &phnum) != 0))
83 for (size_t i = 0; result == 0 && i < phnum; ++i)
/external/valgrind/coregrind/
H A Dpub_core_ume.h56 Int phnum; // OUT: number of phdrs member in struct:__anon24855
/external/syslinux/efi/
H A Dwrapper.c169 __uint16_t phnum = 0, phentsize = 0; local
201 phnum = e32_hdr.e_phnum;
214 phnum = e64_hdr.e_phnum;
229 if (!phoff || !phnum) {
245 for (i = 0; i < phnum; i++) {
260 for (i = 0; i < phnum; i++) {
/external/toybox/toys/posix/
H A Dfile.c53 int phentsize, phnum, shsize, shnum; local
99 phnum = elf_int(toybuf+44+12*bits, 2);
105 // With binutils, phentsize seems to only be non-zero if phnum is non-zero.
107 if (phnum && (phentsize != 32+24*bits)) {
116 for (i = 0; i<phnum; i++) {
/external/elfutils/libdw/
H A Ddwarf_getcfi_elf.c196 size_t phnum; local
197 if (unlikely (elf_getphdrnum (elf, &phnum) != 0))
200 for (size_t i = 0; i < phnum; ++i)
/external/elfutils/src/
H A Delfcompress.c392 size_t phnum; local
393 if (elf_getphdrnum (elf, &phnum) != 0)
406 bool layout = phnum != 0;
415 + gelf_fsize (elf, ELF_T_PHDR, phnum, EV_CURRENT));
596 if (phnum != 0)
598 if (gelf_newphdr (elfnew, phnum) == 0)
604 for (size_t cnt = 0; cnt < phnum; ++cnt)
H A Dfindtextrel.c327 size_t phnum; local
328 if (elf_getphdrnum (elf, &phnum) != 0)
333 for (size_t i = 0; i < phnum; ++i)
H A Dunstrip.c260 size_t phnum;
261 ELF_CHECK (elf_getphdrnum (inelf, &phnum) == 0,
264 if (phnum > 0)
266 ELF_CHECK (gelf_newphdr (outelf, phnum),
270 for (size_t i = 0; i < phnum; ++i)
1031 uint_fast16_t phnum;
1035 phnum = ehdr.e32.e_phnum;
1040 phnum = ehdr.e64.e_phnum;
1044 size_t phsize = gelf_fsize (main, ELF_T_PHDR, phnum, EV_CURRENT);
1939 size_t phnum;
259 size_t phnum; local
1029 uint_fast16_t phnum; local
1937 size_t phnum; local
1980 size_t phnum; local
[all...]

Completed in 513 milliseconds

12