/freebsd-current/contrib/elftoolchain/libelf/ |
H A D | elf_shnum.c | 35 _libelf_getshdrnum(Elf *e, size_t *shnum) argument 49 *shnum = e->e_u.e_elf.e_nscn; 55 elf_getshdrnum(Elf *e, size_t *shnum) argument 57 return (_libelf_getshdrnum(e, shnum)); 62 elf_getshnum(Elf *e, size_t *shnum) argument 64 return (_libelf_getshdrnum(e, shnum) >= 0);
|
H A D | libelf_extended.c | 49 _libelf_setshnum(Elf *e, void *eh, int ec, size_t shnum) argument 53 if (shnum >= SHN_LORESERVE) { 60 scn->s_shdr.s_shdr32.sh_size = (Elf32_Word) shnum; 62 scn->s_shdr.s_shdr64.sh_size = shnum; 66 shnum = 0; 70 ((Elf32_Ehdr *) eh)->e_shnum = shnum & 0xFFFFU; 72 ((Elf64_Ehdr *) eh)->e_shnum = shnum & 0xFFFFU;
|
H A D | libelf_ehdr.c | 110 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 || 201 if ((shnum == 0 && shoff != 0) || phnum == PN_XNUM || strndx == SHN_XINDEX) { 207 e->e_u.e_elf.e_nscn = shnum;
|
H A D | elf_scn.c | 66 size_t fsz, i, shnum; local 77 shnum > SIZE_MAX / fsz || \ 78 fsz * shnum > rawsize - shoff) { \ 88 shnum = e->e_u.e_elf.e_nscn; 120 for (; i < shnum; i++, src += fsz) {
|
H A D | elf_update.c | 515 size_t phnum, shnum; local 573 shnum = e->e_u.e_elf.e_nscn; 669 if (shnum) { 670 fsz = _libelf_fsize(ELF_T_SHDR, ec, eh_version, shnum); 695 _libelf_setshnum(e, ehdr, ec, shnum);
|
/freebsd-current/contrib/file/src/ |
H A D | elfclass.h | 55 shnum = elf_getu16(swap, elfhdr.e_shnum); 56 if (shnum > ms->elf_shnum_max) 57 return toomany(ms, "section", shnum); 61 fsize, shnum, &flags, ¬ecount) == -1) 65 shnum = elf_getu16(swap, elfhdr.e_shnum); 66 if (shnum > ms->elf_shnum_max) 67 return toomany(ms, "section headers", shnum); 69 CAST(off_t, elf_getu(swap, elfhdr.e_shoff)), shnum,
|
H A D | readelf.c | 1831 uint16_t type, phnum, shnum, notecount; local
|
/freebsd-current/crypto/openssl/util/perl/ |
H A D | checkhandshake.pm | 89 my $shnum = 0; 94 $shnum = 1; 98 $shnum++ if ($numsh == 1 && TLSProxy::Proxy::is_tls13()); 113 $shnum++ if $message->mt() == TLSProxy::Message::MT_SERVER_HELLO; 137 && $extshnum != $shnum; 151 $shnum = 0; 156 $shnum = 1; 160 $shnum++ if ($numsh == 1 && TLSProxy::Proxy::is_tls13()); 180 $shnum++ if $message->mt() == TLSProxy::Message::MT_SERVER_HELLO; 215 && $extshnum != $shnum; [all...] |
/freebsd-current/usr.sbin/crunch/crunchide/ |
H A D | exec_elf32.c | 239 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-current/cddl/contrib/opensolaris/lib/libctf/common/ |
H A D | ctf_lib.c | 220 size_t shstrndx, shnum; local 303 shnum = hdr.e64.e_shnum; 307 if ((shstrndx == SHN_XINDEX) || (shnum == 0)) { 316 shnum = x32.sh_size; 326 shnum = x64.sh_size; 331 if (shstrndx >= shnum) 334 nbytes = sizeof (GElf_Shdr) * shnum; 346 nbytes = sizeof (Elf32_Shdr) * shnum; 355 for (i = 0; i < shnum; i++) 387 for (i = 0; i < shnum; [all...] |
/freebsd-current/usr.bin/elfdump/ |
H A D | elfdump.c | 476 * Helpers for ELF files with shnum or shstrndx values that don't fit in the 483 uint64_t shnum; local 485 shnum = elf_get_quarter(e, e, E_SHNUM); 486 if (shnum == 0) 487 shnum = elf_get_word(e, (char *)sh, SH_SIZE); 488 return shnum; 511 u_int64_t shnum; local 617 shnum = elf_get_shnum(e, sh); 624 shnum = 0; 628 for (i = 0; (u_int64_t)i < shnum; 727 u_int64_t shnum; local 813 u_int64_t shnum; local [all...] |
/freebsd-current/contrib/elftoolchain/elfdump/ |
H A D | elfdump.c | 121 size_t shnum; /* #sections. */ member in struct:elfdump 380 if ((uint64_t)ndx < ed->shnum) 1117 if (!elf_getshnum(ed->elf, &ed->shnum)) { 1121 if (ed->shnum == 0) 1123 if ((ed->sl = calloc(ed->shnum, sizeof(*ed->sl))) == NULL) 1150 if (ndx >= ed->shnum) { 1232 if (symtab >= ed->shnum) 1247 if (sym.st_shndx < ed->shnum) { 1400 for (i = 0; i < ed->shnum; i++) { 1469 for (j = 0; j < ed->shnum; [all...] |
/freebsd-current/lib/libc/gen/ |
H A D | nlist.c | 261 elf_sym_to_nlist(struct nlist *nl, Elf_Sym *s, Elf_Shdr *shdr, int shnum) argument 275 if (s->st_shndx >= shnum)
|
/freebsd-current/contrib/elftoolchain/readelf/ |
H A D | readelf.c | 171 size_t shnum; /* #sections. */ member in struct:readelf 2263 size_t phnum, shnum, shstrndx; local 2341 if (elf_getshnum(re->elf, &shnum)) 2342 printf(" (%ju)", (uintmax_t)shnum); 2538 if (re->shnum == 0) 2549 for (j = 1; (size_t)j < re->shnum; j++) { 2629 if (re->shnum == 0) { 2634 (uintmax_t)re->shnum, (uintmax_t)re->ehdr.e_shoff); 2658 for (i = 0; (size_t)i < re->shnum; i++) { 2738 for (i = 0; (size_t)i < re->shnum; [all...] |
/freebsd-current/contrib/elftoolchain/nm/ |
H A D | nm.c | 654 get_sym(Elf *elf, struct sym_head *headp, int shnum, size_t dynndx, argument 674 for (i = 1; i < shnum; i++) { 1200 size_t i, shstrndx, shnum, dynndx, strndx; local 1226 if (!elf_getshnum(elf, &shnum)) { 1234 if (shnum == 0) { 1245 if ((type_table = malloc(sizeof(char) * shnum)) == NULL) { 1251 if ((sec_table = calloc(shnum, sizeof(char *))) == NULL) { 1263 for (i = 1; i < shnum; ++i) { 1435 p_data.list_num = get_sym(elf, &list_head, shnum, dynndx, strndx, 1436 type_table, (void *) sec_table, shnum); [all...] |
/freebsd-current/contrib/llvm-project/lld/ELF/Arch/ |
H A D | ARM.cpp | 1403 const auto shnum = osIsPairs.size() + 1; local 1405 sectionHeaderOff + shnum * sizeof(typename ELFT::Shdr); 1438 eHdr->e_shnum = shnum;
|