Lines Matching refs:cnt
65 size_t cnt;
139 for (cnt = 1; cnt < 4; ++cnt)
145 scn = elf_getscn (elf, cnt);
148 printf ("cannot get section %Zd: %s\n", cnt, elf_errmsg (-1));
157 cnt, elf_errmsg (-1));
163 scnnames[cnt]) != 0)
165 printf ("section %Zd's name differs: %s vs %s\n", cnt,
167 scnnames[cnt]);
171 if (shdr->sh_type != (cnt == 3 ? SHT_STRTAB : SHT_PROGBITS))
173 printf ("section %Zd's type differs\n", cnt);
177 if ((cnt == 1 && shdr->sh_flags != (SHF_ALLOC | SHF_EXECINSTR))
178 || (cnt == 2 && shdr->sh_flags != (SHF_ALLOC | SHF_WRITE))
179 || (cnt == 3 && shdr->sh_flags != 0))
181 printf ("section %Zd's flags differs\n", cnt);
187 printf ("section %Zd's address differs\n", cnt);
193 printf ("section %Zd's offset differs\n", cnt);
197 if ((cnt != 3 && shdr->sh_size != 0)
198 || (cnt == 3 && shdr->sh_size != 23))
200 printf ("section %Zd's size differs\n", cnt);
206 printf ("section %Zd's link differs\n", cnt);
212 printf ("section %Zd's info differs\n", cnt);
216 if ((cnt == 1 && shdr->sh_addralign != 32)
217 || (cnt != 1 && shdr->sh_addralign != 1))
219 printf ("section %Zd's addralign differs\n", cnt);
225 printf ("section %Zd's entsize differs\n", cnt);