Searched refs:shnum (Results 1 - 13 of 13) sorted by relevance

/freebsd-10-stable/lib/libelf/
H A Delf_shnum.c36 _libelf_getshdrnum(Elf *e, size_t *shnum) argument
50 *shnum = e->e_u.e_elf.e_nscn;
56 elf_getshdrnum(Elf *e, size_t *shnum) argument
58 return (_libelf_getshdrnum(e, shnum));
63 elf_getshnum(Elf *e, size_t *shnum) argument
65 return (_libelf_getshdrnum(e, shnum) >= 0);
H A Dlibelf_extended.c50 _libelf_setshnum(Elf *e, void *eh, int ec, size_t shnum) argument
54 if (shnum >= SHN_LORESERVE) {
61 scn->s_shdr.s_shdr32.sh_size = shnum;
63 scn->s_shdr.s_shdr64.sh_size = shnum;
67 shnum = 0;
71 ((Elf32_Ehdr *) eh)->e_shnum = shnum;
73 ((Elf64_Ehdr *) eh)->e_shnum = shnum;
H A Dlibelf_ehdr.c107 uint16_t phnum, shnum, strndx; local
180 shnum = ((Elf32_Ehdr *) ehdr)->e_shnum;
185 shnum = ((Elf64_Ehdr *) ehdr)->e_shnum;
190 if (shnum >= SHN_LORESERVE ||
191 (shoff == 0LL && (shnum != 0 || phnum == PN_XNUM ||
197 if (shnum != 0 || shoff == 0LL) { /* not using extended numbering */
199 e->e_u.e_elf.e_nscn = shnum;
H A Delf_scn.c46 size_t fsz, i, shnum; local
61 shnum > SIZE_MAX / fsz || \
62 fsz * shnum > e->e_rawsize - shoff) { \
72 shnum = e->e_u.e_elf.e_nscn;
103 for (; i < shnum; i++, src += fsz) {
H A Delf_update.c406 size_t phnum, shnum; local
461 shnum = e->e_u.e_elf.e_nscn;
541 if (shnum) {
553 if (shoff + fsz * shnum > (size_t) rc)
554 rc = shoff + fsz * shnum;
563 _libelf_setshnum(e, ehdr, ec, shnum);
710 size_t fsz, msz, phnum, shnum; local
739 shnum = eh32->e_shnum;
745 shnum = eh64->e_shnum;
818 if (shnum !
[all...]
/freebsd-10-stable/contrib/file/src/
H A Delfclass.h55 shnum = elf_getu16(swap, elfhdr.e_shnum);
56 if (shnum > ms->elf_shnum_max)
57 return toomany(ms, "section", shnum);
61 fsize, shnum, &flags, &notecount) == -1)
65 shnum = elf_getu16(swap, elfhdr.e_shnum);
66 if (shnum > ms->elf_shnum_max)
67 return toomany(ms, "section headers", shnum);
69 (off_t)elf_getu(swap, elfhdr.e_shoff), shnum,
H A Dreadelf.c1587 uint16_t type, phnum, shnum, notecount; local
/freebsd-10-stable/usr.sbin/crunch/crunchide/
H A Dexec_elf32.c239 Elf_Half shnum; local
246 shnum = xe16toh(ehdr.e_shnum);
248 shdrsize = shnum * xe16toh(ehdr.e_shentsize);
257 for (i = 0; i < shnum; i++) {
297 layoutp = xmalloc((shnum + 1) * sizeof(struct shlayout),
306 layoutp[shnum].shdr = &shdrshdr;
309 for (i = shnum; i-- != 0;) {
311 r = shnum;
329 ++shnum;
348 for (i = 0; i < shnum;
[all...]
/freebsd-10-stable/cddl/contrib/opensolaris/lib/libctf/common/
H A Dctf_lib.c219 size_t shstrndx, shnum; local
301 shnum = hdr.e64.e_shnum;
305 if ((shstrndx == SHN_XINDEX) || (shnum == 0)) {
314 shnum = x32.sh_size;
324 shnum = x64.sh_size;
329 if (shstrndx >= shnum)
332 nbytes = sizeof (GElf_Shdr) * shnum;
344 nbytes = sizeof (Elf32_Shdr) * shnum;
352 for (i = 0; i < shnum; i++)
384 for (i = 0; i < shnum;
[all...]
/freebsd-10-stable/usr.bin/elfdump/
H A Delfdump.c448 * Helpers for ELF files with shnum or shstrndx values that don't fit in the
455 uint64_t shnum; local
457 shnum = elf_get_quarter(e, e, E_SHNUM);
458 if (shnum == 0)
459 shnum = elf_get_word(e, (char *)sh, SH_SIZE);
460 return shnum;
483 u_int64_t shnum; local
577 shnum = elf_get_shnum(e, sh);
584 shnum = 0;
588 for (i = 0; (u_int64_t)i < shnum;
687 u_int64_t shnum; local
773 u_int64_t shnum; local
[all...]
/freebsd-10-stable/sys/contrib/ia64/libuwx/src/
H A Duwx_symbols.c197 int shnum; member in struct:elf_file
246 if (shndx < 0 || shndx > ef->shnum)
342 if (sect->link > 0 && sect->link < ef->shnum) {
485 (*ef->allocate_cb)(sizeof(struct elf_section) * ef->shnum);
490 for (i = 0; i < ef->shnum; i++) {
592 ef->shnum = header.hdr32.e_shnum;
610 ef->shnum = header.hdr64.e_shnum;
650 ef->shnum = 0;
687 for (i = 0; i < ef->shnum; i++) {
723 for (i = 1; i < ef->shnum;
[all...]
/freebsd-10-stable/lib/libc/gen/
H A Dnlist.c377 elf_sym_to_nlist(nl, s, shdr, shnum)
381 int shnum;
395 if (s->st_shndx >= shnum)
/freebsd-10-stable/contrib/binutils/bfd/
H A Delf.c507 unsigned int i, shnum; local
511 shnum = elf_numsections (abfd);
520 for (i = 0; i < shnum; i++)
546 for (i = 0; i < shnum; i++)
601 if (idx >= shnum)

Completed in 119 milliseconds