| /netbsd-src/external/gpl3/binutils.old/dist/bfd/ |
| H A D | elfcore.h | 173 if (i_ehdrp->e_shoff != 0 && i_ehdrp->e_phnum == PN_XNUM) in elf_core_file_p() 194 i_ehdrp->e_phnum = i_shdr.sh_info; in elf_core_file_p() 195 if (i_ehdrp->e_phnum != i_shdr.sh_info) in elf_core_file_p() 202 if (i_ehdrp->e_phnum > 1) in elf_core_file_p() 210 if (i_ehdrp->e_phnum > (unsigned int) -1 / sizeof (x_phdr) in elf_core_file_p() 211 || i_ehdrp->e_phnum > (unsigned int) -1 / sizeof (i_phdr)) in elf_core_file_p() 214 where = (file_ptr)(i_ehdrp->e_phoff + (i_ehdrp->e_phnum - 1) * sizeof (x_phdr)); in elf_core_file_p() 229 amt = sizeof (*i_phdrp) * i_ehdrp->e_phnum; in elf_core_file_p() 237 for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex) in elf_core_file_p() 265 for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex) in elf_core_file_p() [all …]
|
| H A D | elfcode.h | 253 dst->e_phnum = H_GET_16 (abfd, src->e_phnum); in elf_swap_ehdr_in() 283 tmp = src->e_phnum; in elf_swap_ehdr_out() 286 H_PUT_16 (abfd, tmp, dst->e_phnum); in elf_swap_ehdr_out() 607 if (i_ehdrp->e_phnum > 0) in elf_object_p() 656 if (i_ehdrp->e_phnum == PN_XNUM && i_shdr.sh_info != 0) in elf_object_p() 658 i_ehdrp->e_phnum = i_shdr.sh_info; in elf_object_p() 659 if (i_ehdrp->e_phnum != i_shdr.sh_info) in elf_object_p() 784 if (i_ehdrp->e_phnum == 0) in elf_object_p() 797 && i_ehdrp->e_phnum > filesize / sizeof (Elf_External_Phdr)) in elf_object_p() 799 if (_bfd_mul_overflow (i_ehdrp->e_phnum, sizeof (*i_phdr), &amt)) in elf_object_p() [all …]
|
| /netbsd-src/external/gpl3/binutils/dist/bfd/ |
| H A D | elfcore.h | 173 if (i_ehdrp->e_shoff != 0 && i_ehdrp->e_phnum == PN_XNUM) in elf_core_file_p() 194 i_ehdrp->e_phnum = i_shdr.sh_info; in elf_core_file_p() 195 if (i_ehdrp->e_phnum != i_shdr.sh_info) in elf_core_file_p() 202 if (i_ehdrp->e_phnum > 1) in elf_core_file_p() 210 if (i_ehdrp->e_phnum > (unsigned int) -1 / sizeof (x_phdr) in elf_core_file_p() 211 || i_ehdrp->e_phnum > (unsigned int) -1 / sizeof (i_phdr)) in elf_core_file_p() 214 where = (file_ptr)(i_ehdrp->e_phoff + (i_ehdrp->e_phnum - 1) * sizeof (x_phdr)); in elf_core_file_p() 229 amt = sizeof (*i_phdrp) * i_ehdrp->e_phnum; in elf_core_file_p() 237 for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex) in elf_core_file_p() 265 for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex) in elf_core_file_p() [all …]
|
| H A D | elfcode.h | 253 dst->e_phnum = H_GET_16 (abfd, src->e_phnum); in elf_swap_ehdr_in() 287 tmp = src->e_phnum; in elf_swap_ehdr_out() 290 H_PUT_16 (abfd, tmp, dst->e_phnum); in elf_swap_ehdr_out() 620 if (i_ehdrp->e_phnum > 0) in elf_object_p() 669 if (i_ehdrp->e_phnum == PN_XNUM && i_shdr.sh_info != 0) in elf_object_p() 671 i_ehdrp->e_phnum = i_shdr.sh_info; in elf_object_p() 672 if (i_ehdrp->e_phnum != i_shdr.sh_info) in elf_object_p() 799 if (i_ehdrp->e_phnum == 0) in elf_object_p() 812 && i_ehdrp->e_phnum > filesize / sizeof (Elf_External_Phdr)) in elf_object_p() 814 if (_bfd_mul_overflow (i_ehdrp->e_phnum, sizeof (*i_phdr), &amt)) in elf_object_p() [all …]
|
| /netbsd-src/sys/kern/ |
| H A D | exec_elf.c | 134 for (align = 1, i = 0; i < eh->e_phnum; i++) in elf_placedynexec() 147 for (i = 0; i < eh->e_phnum; i++) in elf_placedynexec() 313 if (eh->e_shnum > ELF_MAXSHNUM || eh->e_phnum > ELF_MAXPHNUM) { in elf_check_header() 314 DPRINTF("bad shnum/phnum %#x/%#x", eh->e_shnum, eh->e_phnum); in elf_check_header() 494 if (eh.e_type != ET_DYN || eh.e_phnum == 0) { in elf_load_interp() 500 phsize = eh.e_phnum * sizeof(Elf_Phdr); in elf_load_interp() 530 for (i = 0, base_ph = NULL; i < eh.e_phnum; i++) { in elf_load_interp() 562 for (i = 0, base_ph = NULL, last_ph = NULL; i < eh.e_phnum; i++) { in elf_load_interp() 676 if (eh->e_phnum == 0) { in exec_elf_makecmds() 693 phsize = eh->e_phnum * sizeo in exec_elf_makecmds() [all...] |
| /netbsd-src/sys/arch/hpcmips/stand/pbsdboot/ |
| H A D | elf.c | 152 if ((phtbl = (Elf_Phdr *)alloc(sizeof(*phtbl) * elf->e_phnum)) == NULL || in scanfile() 164 if (read(fd, (void *)phtbl, sizeof(Elf_Phdr) * elf->e_phnum) in scanfile() 165 != (int)(sizeof(Elf_Phdr) * elf->e_phnum)) { in scanfile() 189 for (i = 0; i < elf->e_phnum; i++) { in scanfile() 273 dbg_eh.e_phnum = 0; in scanfile() 349 if (phtbl) dealloc(phtbl, sizeof(*phtbl) * elf->e_phnum); in scanfile() 358 if (phtbl) dealloc(phtbl, sizeof(*phtbl) * elf->e_phnum); in scanfile()
|
| /netbsd-src/sys/arch/hpc/stand/hpcboot/ |
| H A D | load_elf.cpp | 88 sz = _eh.e_phnum * _eh.e_phentsize; in setFile() 110 for (i = 0; i < _eh.e_phnum; i++, ph++) { in memorySize() 158 for (i = 0, ph = _ph; i < _eh.e_phnum; i++, ph++) { in load() 220 eh->e_phnum = 0; in symbol_block_size() 328 if (_eh.e_phoff == 0 || _eh.e_phnum == 0 || _eh.e_phnum > 16 || in read_header()
|
| /netbsd-src/external/bsd/elftoolchain/dist/libelf/ |
| H A D | gelf_ehdr.c | 87 d->e_phnum = eh32->e_phnum; in gelf_getehdr() 170 eh32->e_phnum = s->e_phnum; in gelf_update_ehdr()
|
| H A D | libelf_extended.c | 138 ((Elf32_Ehdr *) eh)->e_phnum = phnum & 0xFFFFU; in _libelf_setphnum() 140 ((Elf64_Ehdr *) eh)->e_phnum = phnum & 0xFFFFU; in _libelf_setphnum()
|
| /netbsd-src/usr.bin/elf2aout/ |
| H A D | elf2aout.c | 261 ex.e_phnum = bswap16(ex.e_phnum); in main() 272 (size_t)ex.e_phnum * sizeof(Elf32_Phdr), "ph"); in main() 274 bswap32_region((int32_t*)ph, sizeof(Elf32_Phdr) * ex.e_phnum); in main() 312 qsort(ph, ex.e_phnum, sizeof(Elf32_Phdr), phcmp); in main() 313 for (i = 0; i < ex.e_phnum; i++) { in main() 409 for (i = 0; i < ex.e_phnum; i++) { in main()
|
| /netbsd-src/external/cddl/osnet/dist/tools/ctf/cvt/ |
| H A D | output.c | 497 if (sehdr.e_phnum != 0) { in write_file() 499 if (gelf_newphdr(dst, sehdr.e_phnum) == NULL) in write_file() 502 for (i = 0; i < sehdr.e_phnum; i++) { in write_file() 566 if (changing && sehdr.e_phnum != 0) { in write_file() 622 if (sehdr.e_phnum != 0) in write_file() 681 if (changing && sehdr.e_phnum != 0) { in write_file() 700 if (sehdr.e_phnum != 0) { in write_file()
|
| /netbsd-src/sys/arch/zaurus/stand/zbsdmod/ |
| H A D | zbsdmod.c | 122 for (i = 0; i < elf->e_phnum; i++) { in elf32bsdboot() 229 ((Elf_Ehdr *)elfv)->e_phnum = 0; in elf32bsdboot() 237 for (i = 0; esymp != 0 && i < elf->e_phnum; i++) { in elf32bsdboot() 252 for (i = 0; i < elf->e_phnum; i++) { in elf32bsdboot()
|
| /netbsd-src/sys/lib/libsa/ |
| H A D | loadfile_elf32.c | 102 I16(ehdr->e_phnum); in internalize_ehdr() 116 I16(ehdr->e_phnum); in internalize_ehdr() 139 E16(ehdr->e_phnum); in externalize_ehdr() 153 E16(ehdr->e_phnum); in externalize_ehdr() 381 elf->e_phnum = 0; in ELFNAMEEND() 707 sz = elf->e_phnum * sizeof(Elf_Phdr); in ELFNAMEEND() 715 for (i = 0; i < elf->e_phnum; i++) { in ELFNAMEEND() 797 elf->e_phnum = 0; in ELFNAMEEND()
|
| /netbsd-src/usr.sbin/mopd/common/ |
| H A D | file.c | 460 uint32_t e_phoff, e_phentsize, e_phnum; in GetElfFileInfo() 495 e_phnum = mopFileGetLX((u_char *) &ehdr, in GetElfFileInfo() 496 offsetof(Elf32_Ehdr, e_phnum), in GetElfFileInfo() 497 sizeof(ehdr.e_phnum)); in GetElfFileInfo() 514 e_phnum = mopFileGetBX((u_char *) &ehdr, in GetElfFileInfo() 515 offsetof(Elf32_Ehdr, e_phnum), in GetElfFileInfo() 516 sizeof(ehdr.e_phnum)); in GetElfFileInfo() 527 if (e_phnum > SEC_MAX) in GetElfFileInfo() 529 dl->e_nsec = e_phnum; in GetElfFileInfo()
|
| /netbsd-src/sys/arch/atari/stand/tostools/libtos/ |
| H A D | elf.c | 89 i = ehdr.e_phnum * sizeof(Elf32_Phdr); in elf_load() 98 for (i = 0; i < ehdr.e_phnum; i++) { in elf_load() 148 for (i = 0; i < ehdr.e_phnum; i++) { in elf_load()
|
| /netbsd-src/external/gpl3/binutils/dist/binutils/ |
| H A D | elfedit.c | 111 phdrs = xmalloc (elf_header.e_phnum * sizeof (*phdrs)); in update_gnu_property() 117 for (i = 0; i < elf_header.e_phnum; i++) in update_gnu_property() 133 for (i = 0; i < elf_header.e_phnum; i++) in update_gnu_property() 147 for (i = 0; i < elf_header.e_phnum; i++) in update_gnu_property() 484 elf_header.e_phnum = BYTE_GET (ehdr32.e_phnum); in get_file_header() 517 elf_header.e_phnum = BYTE_GET (ehdr64.e_phnum); in get_file_header()
|
| /netbsd-src/external/gpl3/binutils.old/dist/binutils/ |
| H A D | elfedit.c | 111 phdrs = xmalloc (elf_header.e_phnum * sizeof (*phdrs)); in update_gnu_property() 117 for (i = 0; i < elf_header.e_phnum; i++) in update_gnu_property() 133 for (i = 0; i < elf_header.e_phnum; i++) in update_gnu_property() 147 for (i = 0; i < elf_header.e_phnum; i++) in update_gnu_property() 484 elf_header.e_phnum = BYTE_GET (ehdr32.e_phnum); in get_file_header() 517 elf_header.e_phnum = BYTE_GET (ehdr64.e_phnum); in get_file_header()
|
| /netbsd-src/external/bsd/file/dist/src/ |
| H A D | elfclass.h | 41 phnum = elf_getu16(swap, elfhdr.e_phnum); 54 phnum = elf_getu16(swap, elfhdr.e_phnum);
|
| /netbsd-src/sys/compat/linux/arch/amd64/ |
| H A D | linux_exec_machdep.c | 155 phsize = eh->e_phnum * sizeof(Elf_Phdr); in ELFNAME2() 159 for (i = 0; i < eh->e_phnum; i++) { in ELFNAME2() 194 esd.ai[i++].a_v = (ap ? ap->arg_phnum : eh->e_phnum); in ELFNAME2()
|
| /netbsd-src/sys/arch/epoc32/stand/e32boot/exe/ |
| H A D | netbsd.cpp | 99 PhdrSize = sizeof(Elf32_Phdr) * ehdr.e_phnum; in ParseHeader() 103 for (i = 0; i < ehdr.e_phnum; i++) { in ParseHeader()
|
| /netbsd-src/external/gpl3/binutils.old/dist/include/elf/ |
| H A D | external.h | 63 unsigned char e_phnum[2]; /* Program header table entry count */ member 80 unsigned char e_phnum[2]; /* Program header table entry count */ member
|
| /netbsd-src/external/gpl3/binutils/dist/include/elf/ |
| H A D | external.h | 63 unsigned char e_phnum[2]; /* Program header table entry count */ member 80 unsigned char e_phnum[2]; /* Program header table entry count */ member
|
| /netbsd-src/usr.bin/elf2ecoff/ |
| H A D | elf2ecoff.c | 172 ex.e_phnum = bswap16(ex.e_phnum); in main() 180 ex.e_phnum * sizeof(Elf32_Phdr), "ph"); in main() 182 bswap32_region((int32_t*)ph, sizeof(Elf32_Phdr) * ex.e_phnum); in main() 216 qsort(ph, ex.e_phnum, sizeof(Elf32_Phdr), in main() 219 for (i = 0; i < ex.e_phnum; i++) { in main() 393 for (i = 0; i < ex.e_phnum; i++) { in main()
|
| /netbsd-src/external/bsd/elftosb/dist/common/ |
| H A D | StELFFile.cpp | 60 m_header.e_phnum = ENDIAN_LITTLE_TO_HOST_U16(m_header.e_phnum); in readFileHeaders() 105 if (m_header.e_phoff != 0 && m_header.e_phnum > 0) in readFileHeaders() 108 for (i=0; i < m_header.e_phnum; ++i) in readFileHeaders()
|
| /netbsd-src/libexec/ld.elf_so/ |
| H A D | map_object.c | 168 assert(ehdr->e_phoff + ehdr->e_phnum * sizeof(Elf_Phdr) <= in _rtld_map_object() 181 phsize = ehdr->e_phnum * sizeof(phdr[0]); in _rtld_map_object() 189 phlimit = phdr + ehdr->e_phnum; in _rtld_map_object() 190 segs = xmalloc(sizeof(segs[0]) * ehdr->e_phnum); in _rtld_map_object()
|