• Home
  • Raw
  • Download

Lines Matching refs:cnt

357   size_t cnt;  in check_elf_header()  local
397 for (cnt = EI_PAD; cnt < EI_NIDENT; ++cnt) in check_elf_header()
398 if (ehdr->e_ident[cnt] != 0) in check_elf_header()
399 ERROR (gettext ("e_ident[%zu] is not zero\n"), cnt); in check_elf_header()
407 for (cnt = 0; cnt < nvalid_e_machine; ++cnt) in check_elf_header()
408 if (valid_e_machine[cnt] == ehdr->e_machine) in check_elf_header()
410 if (cnt == nvalid_e_machine) in check_elf_header()
542 size_t cnt; in check_scn_group() local
544 for (cnt = idx + 1; cnt < shnum; ++cnt) in check_scn_group()
546 Elf_Scn *scn = elf_getscn (ebl->elf, cnt); in check_scn_group()
572 if (cnt == shnum) in check_scn_group()
580 cnt, section_name (ebl, cnt)); in check_scn_group()
616 for (size_t cnt = 1; cnt < shnum; ++cnt) in check_symtab() local
617 if (cnt != (size_t) idx) in check_symtab()
619 Elf_Scn *xndxscn = elf_getscn (ebl->elf, cnt); in check_symtab()
678 for (size_t cnt = 1; cnt < shdr->sh_size / sh_entsize; ++cnt) in check_symtab() local
680 sym = gelf_getsymshndx (data, xndxdata, cnt, &sym_mem, &xndx); in check_symtab()
684 idx, section_name (ebl, idx), cnt, elf_errmsg (-1)); in check_symtab()
694 idx, section_name (ebl, idx), cnt); in check_symtab()
709 idx, section_name (ebl, idx), cnt); in check_symtab()
715 xndxscnidx, section_name (ebl, xndxscnidx), cnt, in check_symtab()
727 idx, section_name (ebl, idx), cnt); in check_symtab()
734 idx, section_name (ebl, idx), cnt); in check_symtab()
741 idx, section_name (ebl, idx), cnt); in check_symtab()
746 idx, section_name (ebl, idx), cnt); in check_symtab()
754 idx, section_name (ebl, idx), cnt); in check_symtab()
755 if (cnt < shdr->sh_info) in check_symtab()
758 idx, section_name (ebl, idx), cnt); in check_symtab()
762 idx, section_name (ebl, idx), cnt); in check_symtab()
813 idx, section_name (ebl, idx), cnt); in check_symtab()
819 idx, section_name (ebl, idx), cnt, in check_symtab()
828 idx, section_name (ebl, idx), cnt, in check_symtab()
838 idx, section_name (ebl, idx), cnt, in check_symtab()
844 idx, section_name (ebl, idx), cnt, in check_symtab()
865 idx, section_name (ebl, idx), cnt); in check_symtab()
871 idx, section_name (ebl, idx), cnt); in check_symtab()
879 idx, section_name (ebl, idx), cnt, in check_symtab()
886 idx, section_name (ebl, idx), cnt, in check_symtab()
893 idx, section_name (ebl, idx), cnt, in check_symtab()
903 if (cnt >= shdr->sh_info) in check_symtab()
906 idx, section_name (ebl, idx), cnt); in check_symtab()
910 if (cnt < shdr->sh_info) in check_symtab()
913 idx, section_name (ebl, idx), cnt); in check_symtab()
920 idx, section_name (ebl, idx), cnt); in check_symtab()
1044 idx, section_name (ebl, idx), cnt); in check_symtab()
1048 idx, section_name (ebl, idx), cnt); in check_symtab()
1081 size_t cnt; in is_rel_dyn() local
1088 for (cnt = 1; cnt < rcshdr->sh_size / rcshdr->sh_entsize; ++cnt) in is_rel_dyn()
1091 GElf_Dyn *dyn = gelf_getdyn (d, cnt, &dyn_mem); in is_rel_dyn()
1352 size_t cnt, const GElf_Shdr *symshdr, Elf_Data *symdata, in check_one_reloc() argument
1361 idx, section_name (ebl, idx), cnt); in check_one_reloc()
1370 idx, section_name (ebl, idx), cnt); in check_one_reloc()
1378 idx, section_name (ebl, idx), cnt); in check_one_reloc()
1396 idx, section_name (ebl, idx), cnt, in check_one_reloc()
1413 idx, section_name (ebl, idx), cnt); in check_one_reloc()
1427 idx, section_name (ebl, idx), cnt, in check_one_reloc()
1448 idx, section_name (ebl, idx), cnt); in check_one_reloc()
1496 for (size_t cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt) in check_rela() local
1499 GElf_Rela *rela = gelf_getrela (data, cnt, &rela_mem); in check_rela()
1504 idx, section_name (ebl, idx), cnt, elf_errmsg (-1)); in check_rela()
1508 check_one_reloc (ebl, ehdr, shdr, idx, cnt, symshdr, symdata, in check_rela()
1547 for (size_t cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt) in check_rel() local
1550 GElf_Rel *rel = gelf_getrel (data, cnt, &rel_mem); in check_rel()
1555 idx, section_name (ebl, idx), cnt, elf_errmsg (-1)); in check_rel()
1559 check_one_reloc (ebl, ehdr, shdr, idx, cnt, symshdr, symdata, in check_rel()
1583 size_t cnt; in check_dynamic() local
1664 for (cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt) in check_dynamic()
1667 GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dyn_mem); in check_dynamic()
1672 idx, section_name (ebl, idx), cnt, elf_errmsg (-1)); in check_dynamic()
1686 idx, section_name (ebl, idx), cnt); in check_dynamic()
1698 idx, section_name (ebl, idx), cnt, in check_dynamic()
1708 idx, section_name (ebl, idx), cnt, in check_dynamic()
1726 idx, section_name (ebl, idx), cnt); in check_dynamic()
1739 idx, section_name (ebl, idx), cnt, in check_dynamic()
1782 idx, section_name (ebl, idx), cnt, in check_dynamic()
1797 idx, section_name (ebl, idx), cnt, in check_dynamic()
1806 for (cnt = 1; cnt < DT_NUM; ++cnt) in check_dynamic()
1807 if (has_dt[cnt]) in check_dynamic()
1810 if (dependencies[cnt][inner] && ! has_dt[inner]) in check_dynamic()
1818 ebl_dynamic_tag_name (ebl, cnt, buf1, sizeof (buf1)), in check_dynamic()
1824 if (mandatory[cnt]) in check_dynamic()
1830 ebl_dynamic_tag_name (ebl, cnt, buf, sizeof (buf))); in check_dynamic()
1952 for (size_t cnt = idx + 1; cnt < shnum; ++cnt) in check_symtab_shndx() local
1955 GElf_Shdr *rshdr = gelf_getshdr (elf_getscn (ebl->elf, cnt), &rshdr_mem); in check_symtab_shndx()
1962 cnt, section_name (ebl, cnt)); in check_symtab_shndx()
1978 for (size_t cnt = 1; cnt < data->d_size / sizeof (Elf32_Word); ++cnt) in check_symtab_shndx() local
1980 Elf32_Word xndx = ((Elf32_Word *) data->d_buf)[cnt]; in check_symtab_shndx()
1985 GElf_Sym *sym = gelf_getsym (symdata, cnt, &sym_data); in check_symtab_shndx()
1988 ERROR (gettext ("cannot get data for symbol %zu\n"), cnt); in check_symtab_shndx()
2029 size_t cnt; in check_sysv_hash() local
2030 for (cnt = 2; cnt < 2 + nbucket; ++cnt) in check_sysv_hash()
2032 if (buf + cnt >= end) in check_sysv_hash()
2034 else if (buf[cnt] >= maxidx) in check_sysv_hash()
2037 idx, section_name (ebl, idx), cnt - 2); in check_sysv_hash()
2040 for (; cnt < 2 + nbucket + nchain; ++cnt) in check_sysv_hash()
2042 if (buf + cnt >= end) in check_sysv_hash()
2044 else if (buf[cnt] >= maxidx) in check_sysv_hash()
2047 idx, section_name (ebl, idx), cnt - 2 - nbucket); in check_sysv_hash()
2080 size_t cnt; in check_sysv_hash64() local
2081 for (cnt = 2; cnt < 2 + nbucket; ++cnt) in check_sysv_hash64()
2083 if (buf + cnt >= end) in check_sysv_hash64()
2085 else if (buf[cnt] >= maxidx) in check_sysv_hash64()
2088 idx, section_name (ebl, idx), cnt - 2); in check_sysv_hash64()
2091 for (; cnt < 2 + nbucket + nchain; ++cnt) in check_sysv_hash64()
2093 if (buf + cnt >= end) in check_sysv_hash64()
2095 else if (buf[cnt] >= maxidx) in check_sysv_hash64()
2098 idx, section_name (ebl, idx), (uint64_t) cnt - 2 - nbucket); in check_sysv_hash64()
2170 size_t cnt; in check_gnu_hash() local
2171 for (cnt = 4 + bitmask_words; cnt < 4 + bitmask_words + nbuckets; ++cnt) in check_gnu_hash()
2173 Elf32_Word symidx = ((Elf32_Word *) data->d_buf)[cnt]; in check_gnu_hash()
2182 idx, section_name (ebl, idx), cnt - (4 + bitmask_words)); in check_gnu_hash()
2204 cnt - (4 + bitmask_words)); in check_gnu_hash()
2217 cnt - (4 + bitmask_words)); in check_gnu_hash()
2226 cnt - (4 + bitmask_words)); in check_gnu_hash()
2255 idx, section_name (ebl, idx), cnt - (4 + bitmask_words)); in check_gnu_hash()
2260 idx, section_name (ebl, idx), cnt - (4 + bitmask_words)); in check_gnu_hash()
2428 for (Elf32_Word cnt = 0; cnt < gnu_nbucket; ++cnt) in compare_hash_gnu_hash() local
2430 if (gnu_bucket[cnt] != STN_UNDEF) in compare_hash_gnu_hash()
2432 Elf32_Word symidx = gnu_bucket[cnt] - gnu_symbias; in compare_hash_gnu_hash()
2475 for (Elf32_Word cnt = 0; cnt < nbucket; ++cnt) in compare_hash_gnu_hash() local
2477 Elf32_Word symidx = bucket[cnt]; in compare_hash_gnu_hash()
2512 for (Elf64_Xword cnt = 0; cnt < nbucket; ++cnt) in compare_hash_gnu_hash() local
2514 Elf64_Xword symidx = bucket[cnt]; in compare_hash_gnu_hash()
2541 for (uint32_t cnt = 1; cnt < nentries; ++cnt) in compare_hash_gnu_hash() local
2542 if (used[cnt] != 0 && used[cnt] != 3) in compare_hash_gnu_hash()
2544 if (used[cnt] == 1) in compare_hash_gnu_hash()
2547 cnt, gnu_hash_idx, in compare_hash_gnu_hash()
2554 GElf_Sym *sym = gelf_getsym (sym_data, cnt, &sym_mem); in compare_hash_gnu_hash()
2559 cnt, hash_idx, in compare_hash_gnu_hash()
2653 size_t cnt; in check_group() local
2686 for (cnt = elsize; cnt < data->d_size; cnt += elsize) in check_group()
2689 val = *((Elf32_Word *) ((char *) data->d_buf + cnt)); in check_group()
2691 memcpy (&val, (char *) data->d_buf + cnt, elsize); in check_group()
2697 idx, section_name (ebl, idx), cnt / elsize); in check_group()
2706 idx, section_name (ebl, idx), cnt / elsize, in check_group()
2719 idx, section_name (ebl, idx), cnt / elsize, in check_group()
2763 for (size_t cnt = 0; cnt < nknown_flags; ++cnt) in section_flags_string() local
2764 if (flags & known_flags[cnt].flag) in section_flags_string()
2772 size_t ncopy = MIN (len - 1, strlen (known_flags[cnt].name)); in section_flags_string()
2773 cp = mempcpy (cp, known_flags[cnt].name, ncopy); in section_flags_string()
2776 flags ^= known_flags[cnt].flag; in section_flags_string()
2936 for (int cnt = 1; (size_t) cnt < shdr->sh_size / shdr->sh_entsize; ++cnt) in check_versym() local
2939 GElf_Versym *versym = gelf_getversym (data, cnt, &versym_mem); in check_versym()
2944 idx, section_name (ebl, idx), cnt); in check_versym()
2949 GElf_Sym *sym = gelf_getsym (symdata, cnt, &sym_mem); in check_versym()
2960 idx, section_name (ebl, idx), cnt); in check_versym()
2968 idx, section_name (ebl, idx), cnt); in check_versym()
2982 idx, section_name (ebl, idx), cnt, (int) *versym); in check_versym()
2987 idx, section_name (ebl, idx), cnt, (int) *versym); in check_versym()
2993 if (!has_copy_reloc (ebl, shdr->sh_link, cnt) in check_versym()
2997 idx, section_name (ebl, idx), cnt, (int) *versym); in check_versym()
3068 for (Elf64_Word cnt = shdr->sh_info; cnt > 0; ) in check_verneed() local
3070 cnt--; in check_verneed()
3083 idx, section_name (ebl, idx), cnt, (int) need->vn_version); in check_verneed()
3090 idx, section_name (ebl, idx), cnt); in check_verneed()
3100 idx, section_name (ebl, idx), cnt); in check_verneed()
3108 idx, section_name (ebl, idx), cnt); in check_verneed()
3120 idx, section_name (ebl, idx), need->vn_cnt - cnt2, cnt); in check_verneed()
3128 idx, section_name (ebl, idx), need->vn_cnt - cnt2, cnt); in check_verneed()
3138 cnt, (int) hashval, (int) aux->vna_hash); in check_verneed()
3147 cnt, verstr); in check_verneed()
3157 idx, section_name (ebl, idx), need->vn_cnt - cnt2, cnt); in check_verneed()
3169 if ((need->vn_next != 0 || cnt > 0) in check_verneed()
3174 idx, section_name (ebl, idx), cnt); in check_verneed()
3178 if (need->vn_next == 0 && cnt > 0) in check_verneed()
3182 idx, section_name (ebl, idx), cnt); in check_verneed()
3229 for (Elf64_Word cnt = shdr->sh_info; cnt > 0; ) in check_verdef() local
3231 cnt--; in check_verdef()
3254 idx, section_name (ebl, idx), cnt); in check_verdef()
3259 idx, section_name (ebl, idx), cnt, (int) def->vd_version); in check_verdef()
3266 idx, section_name (ebl, idx), cnt); in check_verdef()
3281 idx, section_name (ebl, idx), cnt); in check_verdef()
3288 idx, section_name (ebl, idx), cnt, (int) hashval, in check_verdef()
3296 idx, section_name (ebl, idx), cnt, name); in check_verdef()
3316 idx, section_name (ebl, idx), cnt); in check_verdef()
3333 idx, section_name (ebl, idx), cnt); in check_verdef()
3345 if ((def->vd_next != 0 || cnt > 0) in check_verdef()
3350 idx, section_name (ebl, idx), cnt); in check_verdef()
3354 if (def->vd_next == 0 && cnt > 0) in check_verdef()
3358 idx, section_name (ebl, idx), cnt); in check_verdef()
3702 for (size_t cnt = 1; cnt < shnum; ++cnt) in check_sections() local
3704 Elf_Scn *scn = elf_getscn (ebl->elf, cnt); in check_sections()
3710 cnt, section_name (ebl, cnt), elf_errmsg (-1)); in check_sections()
3717 ERROR (gettext ("section [%2zu]: invalid name\n"), cnt); in check_sections()
3746 (int) cnt, scnname, in check_sections()
3764 cnt, scnname, in check_sections()
3782 cnt, scnname, in check_sections()
3800 cnt, scnname); in check_sections()
3806 cnt, scnname); in check_sections()
3811 cnt, scnname); in check_sections()
3819 cnt, scnname); in check_sections()
3838 cnt, scnname); in check_sections()
3843 cnt, scnname); in check_sections()
3852 eh_frame_hdr_scnndx = cnt; in check_sections()
3854 eh_frame_scnndx = cnt; in check_sections()
3856 gcc_except_table_scnndx = cnt; in check_sections()
3862 cnt, section_name (ebl, cnt)); in check_sections()
3876 cnt, section_name (ebl, cnt), in check_sections()
3893 cnt, section_name (ebl, cnt), sh_flags & SHF_MASKPROC); in check_sections()
3899 cnt, section_name (ebl, cnt), sh_flags); in check_sections()
3907 cnt, section_name (ebl, cnt)); in check_sections()
3917 cnt, section_name (ebl, cnt)); in check_sections()
3922 cnt, section_name (ebl, cnt)); in check_sections()
3928 cnt, section_name (ebl, cnt), elf_errmsg (-1)); in check_sections()
3934 cnt, section_name (ebl, cnt)); in check_sections()
3939 cnt, section_name (ebl, cnt)); in check_sections()
3946 cnt, section_name (ebl, cnt)); in check_sections()
3951 cnt, section_name (ebl, cnt)); in check_sections()
3954 check_scn_group (ebl, cnt); in check_sections()
3969 cnt, section_name (ebl, cnt), shdr->sh_type); in check_sections()
3978 cnt, section_name (ebl, cnt)); in check_sections()
3981 && !ebl_check_special_section (ebl, cnt, shdr, in check_sections()
3982 section_name (ebl, cnt))) in check_sections()
3985 cnt, section_name (ebl, cnt)); in check_sections()
4016 cnt, section_name (ebl, cnt), pcnt); in check_sections()
4026 cnt, section_name (ebl, cnt), pcnt); in check_sections()
4052 cnt, section_name (ebl, cnt), pcnt); in check_sections()
4063 cnt, section_name (ebl, cnt), pcnt); in check_sections()
4074 cnt, section_name (ebl, cnt), pcnt); in check_sections()
4084 cnt, section_name (ebl, cnt), pcnt); in check_sections()
4094 cnt, section_name (ebl, cnt)); in check_sections()
4097 if (cnt == shstrndx && shdr->sh_type != SHT_STRTAB) in check_sections()
4100 cnt, section_name (ebl, cnt)); in check_sections()
4108 cnt, section_name (ebl, cnt)); in check_sections()
4111 check_symtab (ebl, ehdr, shdr, cnt); in check_sections()
4115 check_rela (ebl, ehdr, shdr, cnt); in check_sections()
4119 check_rel (ebl, ehdr, shdr, cnt); in check_sections()
4123 check_dynamic (ebl, ehdr, shdr, cnt); in check_sections()
4127 check_symtab_shndx (ebl, ehdr, shdr, cnt); in check_sections()
4131 check_hash (shdr->sh_type, ebl, ehdr, shdr, cnt); in check_sections()
4132 hash_idx = cnt; in check_sections()
4136 check_hash (shdr->sh_type, ebl, ehdr, shdr, cnt); in check_sections()
4137 gnu_hash_idx = cnt; in check_sections()
4141 check_null (ebl, shdr, cnt); in check_sections()
4145 check_group (ebl, ehdr, shdr, cnt); in check_sections()
4149 check_note_section (ebl, ehdr, shdr, cnt); in check_sections()
4158 versym_scnndx = cnt; in check_sections()
4162 check_verneed (ebl, shdr, cnt); in check_sections()
4166 check_verdef (ebl, shdr, cnt); in check_sections()
4170 check_attributes (ebl, ehdr, shdr, cnt); in check_sections()
4328 check_note (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Phdr *phdr, int cnt) in check_note() argument
4334 cnt); in check_note()
4348 notes_size = check_note_data (ebl, ehdr, data, 0, cnt, phdr->p_offset); in check_note()
4352 cnt, elf_errmsg (-1)); in check_note()
4355 cnt, phdr->p_filesz - notes_size); in check_note()
4410 for (unsigned int cnt = 0; cnt < phnum; ++cnt) in check_program_header() local
4415 phdr = gelf_getphdr (ebl->elf, cnt, &phdr_mem); in check_program_header()
4419 cnt, elf_errmsg (-1)); in check_program_header()
4429 cnt, (uint64_t) phdr->p_type); in check_program_header()
4449 check_note (ebl, ehdr, phdr, cnt); in check_program_header()
4514 cnt, inner); in check_program_header()
4521 inner, cnt); in check_program_header()
4630 pt_gnu_eh_frame_pndx = cnt; in check_program_header()
4637 cnt); in check_program_header()
4643 program header entry %d: alignment not a power of 2\n"), cnt); in check_program_header()
4646 program header entry %d: file offset and virtual address not module of alignment\n"), cnt); in check_program_header()