Home
last modified time | relevance | path

Searched refs:e_phnum (Results 1 – 25 of 55) sorted by relevance

123

/openbsd/libexec/ld.so/ldd/
H A Dldd.c137 if (ehdr.e_phnum == 0 || ehdr.e_phentsize == 0) { in doit()
143 if ((phdr = reallocarray(NULL, ehdr.e_phnum, sizeof(Elf_Phdr))) == NULL) in doit()
145 size = ehdr.e_phnum * sizeof(Elf_Phdr); in doit()
155 for (i = 0; i < ehdr.e_phnum; i++) in doit()
188 if (i == ehdr.e_phnum) { in doit()
/openbsd/gnu/usr.bin/binutils-2.17/bfd/
H A Delfcore.h179 if (i_ehdrp->e_phnum == PN_XNUM) in elf_core_file_p()
199 i_ehdrp->e_phnum = i_shdr.sh_info; in elf_core_file_p()
200 if (i_ehdrp->e_phnum != i_shdr.sh_info) in elf_core_file_p()
214 amt = sizeof (*i_phdrp) * i_ehdrp->e_phnum; in elf_core_file_p()
222 for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex) in elf_core_file_p()
250 for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex) in elf_core_file_p()
H A Delfcode.h244 dst->e_phnum = H_GET_16 (abfd, src->e_phnum); in elf_swap_ehdr_in()
274 tmp = src->e_phnum; in elf_swap_ehdr_out()
277 H_PUT_16 (abfd, tmp, dst->e_phnum); in elf_swap_ehdr_out()
622 if (i_ehdrp->e_phnum > 0) in elf_object_p()
668 if (i_ehdrp->e_phnum == PN_XNUM) in elf_object_p()
670 i_ehdrp->e_phnum = i_shdr.sh_info; in elf_object_p()
671 if (i_ehdrp->e_phnum != i_shdr.sh_info) in elf_object_p()
784 if (i_ehdrp->e_phnum == 0) in elf_object_p()
1046 if (i_ehdrp->e_phnum >= PN_XNUM) in elf_write_shdrs_and_ehdr()
1696 for (i = 0; i < i_ehdr.e_phnum; ++i) in NAME()
[all …]
/openbsd/gnu/usr.bin/binutils/bfd/
H A Delfcore.h179 if (i_ehdrp->e_phnum == PN_XNUM) in elf_core_file_p()
199 i_ehdrp->e_phnum = i_shdr.sh_info; in elf_core_file_p()
200 if (i_ehdrp->e_phnum != i_shdr.sh_info) in elf_core_file_p()
214 amt = sizeof (*i_phdrp) * i_ehdrp->e_phnum; in elf_core_file_p()
222 for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex) in elf_core_file_p()
243 for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex) in elf_core_file_p()
H A Delfcode.h242 dst->e_phnum = H_GET_16 (abfd, src->e_phnum); in elf_swap_ehdr_in()
272 tmp = src->e_phnum; in elf_swap_ehdr_out()
275 H_PUT_16 (abfd, tmp, dst->e_phnum); in elf_swap_ehdr_out()
602 if (i_ehdrp->e_phnum > 0) in elf_object_p()
637 if (i_ehdrp->e_phnum == PN_XNUM) in elf_object_p()
639 i_ehdrp->e_phnum = i_shdr.sh_info; in elf_object_p()
705 if (i_ehdrp->e_phnum == 0) in elf_object_p()
964 if (i_ehdrp->e_phnum >= PN_XNUM) in elf_write_shdrs_and_ehdr()
965 i_shdrp[0]->sh_info = i_ehdrp->e_phnum; in elf_write_shdrs_and_ehdr()
1618 for (i = 0; i < i_ehdr.e_phnum; ++i) in NAME()
[all …]
/openbsd/usr.sbin/mopd/common/
H A Dfile.c540 offsetof(Elf32_Ehdr, e_phnum), in GetElf32FileInfo()
541 sizeof(ehdr.e_phnum)); in GetElf32FileInfo()
559 offsetof(Elf32_Ehdr, e_phnum), in GetElf32FileInfo()
560 sizeof(ehdr.e_phnum)); in GetElf32FileInfo()
567 if (e_phnum > SEC_MAX) in GetElf32FileInfo()
569 dl->e_nsec = e_phnum; in GetElf32FileInfo()
694 uint32_t e_phentsize, e_phnum; in GetElf64FileInfo()
732 sizeof(ehdr.e_phnum)); in GetElf64FileInfo()
751 sizeof(ehdr.e_phnum)); in GetElf64FileInfo()
758 if (e_phnum > SEC_MAX) in GetElf64FileInfo()
[all …]
/openbsd/lib/libelf/
H A Dgelf_ehdr.c78 d->e_phnum = eh32->e_phnum; in gelf_getehdr()
161 eh32->e_phnum = s->e_phnum; in gelf_update_ehdr()
H A Dlibelf_extended.c129 ((Elf32_Ehdr *) eh)->e_phnum = phnum & 0xFFFFU; in _libelf_setphnum()
131 ((Elf64_Ehdr *) eh)->e_phnum = phnum & 0xFFFFU; in _libelf_setphnum()
H A Dlibelf_ehdr.c179 phnum = ((Elf32_Ehdr *) ehdr)->e_phnum; in _libelf_ehdr()
184 phnum = ((Elf64_Ehdr *) ehdr)->e_phnum; in _libelf_ehdr()
H A Delf_types.m4112 `e_phnum, HALF',
129 `e_phnum, HALF',
/openbsd/sys/arch/octeon/dev/
H A Doctboot.c133 ph = mallocarray(eh.e_phnum, sizeof(Elf_Phdr), M_TEMP, M_NOWAIT); in octboot_kexec()
138 phsize = eh.e_phnum * sizeof(Elf_Phdr); in octboot_kexec()
155 for (i = 0; i < eh.e_phnum; i++) { in octboot_kexec()
170 for (i = 0; i < eh.e_phnum; i++) { in octboot_kexec()
186 for (i = 0; i < eh.e_phnum; i++) { in octboot_kexec()
271 eh.e_phnum = 0; in octboot_kexec()
344 for (i = 0; i < eh.e_phnum && nalloc > 0; i++) { in octboot_kexec()
/openbsd/sys/arch/powerpc64/dev/
H A Dkexec.c113 ph = mallocarray(eh.e_phnum, sizeof(Elf_Phdr), M_TEMP, M_NOWAIT); in kexec_kexec()
118 phsize = eh.e_phnum * sizeof(Elf_Phdr); in kexec_kexec()
138 for (i = 0; i < eh.e_phnum; i++) { in kexec_kexec()
154 for (i = 0; i < eh.e_phnum; i++) { in kexec_kexec()
171 for (i = 0; i < eh.e_phnum; i++) { in kexec_kexec()
/openbsd/sys/kern/
H A Dexec_elf.c151 if (ehdr->e_phnum > ELF_MAX_VALID_PHDR) in elf_check_header()
397 phsize = eh.e_phnum * sizeof(Elf_Phdr); in elf_load_file()
402 for (i = 0; i < eh.e_phnum; i++) { in elf_load_file()
484 for (i = 0; i < eh.e_phnum; i++) { in elf_load_file()
634 phsize = eh->e_phnum * sizeof(Elf_Phdr); in exec_elf_makecmds()
643 for (i = 0, pp = ph; i < eh->e_phnum; i++, pp++) { in exec_elf_makecmds()
909 ap->arg_phnum = eh->e_phnum; in exec_elf_makecmds()
1070 phsize = eh->e_phnum * sizeof(Elf_Phdr); in elf_os_pt_note()
1075 for (ph = hph; ph < &hph[eh->e_phnum]; ph++) { in elf_os_pt_note()
1309 ehdr.e_phnum = ws->npsections; in coredump_setup_elf()
[all …]
/openbsd/gnu/usr.bin/binutils/include/elf/
H A Dexternal.h51 unsigned char e_phnum[2]; /* Program header table entry count */ member
68 unsigned char e_phnum[2]; /* Program header table entry count */ member
H A Dinternal.h55 unsigned int e_phnum; /* Program header table entry count */ member
/openbsd/gnu/usr.bin/binutils-2.17/include/elf/
H A Dexternal.h51 unsigned char e_phnum[2]; /* Program header table entry count */ member
68 unsigned char e_phnum[2]; /* Program header table entry count */ member
H A Dinternal.h55 unsigned int e_phnum; /* Program header table entry count */ member
/openbsd/usr.sbin/mkuboot/
H A Dcopy_elf.c83 for (i = 0; i < letoh16(ehdr.e_phnum); i++) { in ELFNAME()
129 for (i = 0; i < letoh16(ehdr.e_phnum); i++) { in ELFNAME()
131 fprintf(stderr, "phdr %d/%d\n", i, letoh16(ehdr.e_phnum)); in ELFNAME()
257 elf.e_phnum = 0; in ELFNAME()
/openbsd/sys/lib/libsa/
H A Dloadfile_elf.c85 sz = elf->e_phnum * sizeof(Elf_Phdr); in ELFNAME()
99 for (first = 1, i = 0; i < elf->e_phnum; i++) { in ELFNAME()
281 elf->e_phnum = 0; in ELFNAME()
/openbsd/libexec/ld.so/
H A Dlibrary.c162 for (i = 0; i < ehdr->e_phnum; i++, phdp++) { in _dl_tryload_shlib()
229 for (i = 0; i < ehdr->e_phnum; i++, phdp++) { in _dl_tryload_shlib()
335 (Elf_Phdr *)((char *)libaddr + ehdr->e_phoff), ehdr->e_phnum,type, in _dl_tryload_shlib()
H A Dlibrary_mquery.c172 for (i = 0; i < ehdr->e_phnum; i++, phdp++) { in _dl_tryload_shlib()
313 for (i = 0; i < ehdr->e_phnum; i++, phdp++) { in _dl_tryload_shlib()
343 (Elf_Phdr *)((char *)lowld->start + ehdr->e_phoff), ehdr->e_phnum, in _dl_tryload_shlib()
/openbsd/usr.sbin/vmd/
H A Dloadfile_elf.c691 sz = elf->e_phnum * sizeof(Elf64_Phdr); in elf64_exec()
704 for (i = 0; i < elf->e_phnum; i++) { in elf64_exec()
864 elf->e_phnum = 0; in elf64_exec()
909 sz = elf->e_phnum * sizeof(Elf32_Phdr); in elf32_exec()
922 for (i = 0; i < elf->e_phnum; i++) { in elf32_exec()
1081 elf->e_phnum = 0; in elf32_exec()
/openbsd/sys/arch/sparc64/stand/ofwboot/
H A Delf64_exec.c94 for (i = 0; i < elf->e_phnum; i++) { in elf64_exec()
236 elf->e_phnum = 0; in elf64_exec()
/openbsd/gnu/llvm/lldb/source/Plugins/ObjectFile/ELF/
H A DELFHeader.cpp106 e_phnum = section_zero.sh_info; in ParseHeaderExtension()
146 e_phnum = e_phnum_hdr; in Parse()
/openbsd/usr.sbin/installboot/
H A Di386_installboot.c727 if (eh.e_phnum != 1) in loadproto()
729 fname, eh.e_phnum); in loadproto()
731 ph = reallocarray(NULL, eh.e_phnum, sizeof(Elf_Phdr)); in loadproto()
734 phsize = eh.e_phnum * sizeof(Elf_Phdr); in loadproto()

123