Home
last modified time | relevance | path

Searched refs:shnum (Results 1 – 16 of 16) sorted by relevance

/freebsd/contrib/elftoolchain/libelf/
H A Delf_shnum.c35 _libelf_getshdrnum(Elf *e, size_t *shnum) in _libelf_getshdrnum() argument
49 *shnum = e->e_u.e_elf.e_nscn; in _libelf_getshdrnum()
55 elf_getshdrnum(Elf *e, size_t *shnum) in elf_getshdrnum() argument
57 return (_libelf_getshdrnum(e, shnum)); in elf_getshdrnum()
62 elf_getshnum(Elf *e, size_t *shnum) in elf_getshnum() argument
64 return (_libelf_getshdrnum(e, shnum) >= 0); in elf_getshnum()
H A Dlibelf_extended.c49 _libelf_setshnum(Elf *e, void *eh, int ec, size_t shnum) in _libelf_setshnum() argument
53 if (shnum >= SHN_LORESERVE) { in _libelf_setshnum()
60 scn->s_shdr.s_shdr32.sh_size = (Elf32_Word) shnum; in _libelf_setshnum()
62 scn->s_shdr.s_shdr64.sh_size = shnum; in _libelf_setshnum()
66 shnum = 0; in _libelf_setshnum()
70 ((Elf32_Ehdr *) eh)->e_shnum = shnum & 0xFFFFU; in _libelf_setshnum()
72 ((Elf64_Ehdr *) eh)->e_shnum = shnum & 0xFFFFU; in _libelf_setshnum()
H A Dlibelf_ehdr.c110 uint16_t phnum, shnum, strndx; in _libelf_ehdr() local
180 shnum = ((Elf32_Ehdr *) ehdr)->e_shnum; in _libelf_ehdr()
185 shnum = ((Elf64_Ehdr *) ehdr)->e_shnum; in _libelf_ehdr()
190 if (shnum >= SHN_LORESERVE || in _libelf_ehdr()
191 (shoff == 0LL && (shnum != 0 || phnum == PN_XNUM || in _libelf_ehdr()
201 if ((shnum == 0 && shoff != 0) || phnum == PN_XNUM || strndx == SHN_XINDEX) { in _libelf_ehdr()
207 e->e_u.e_elf.e_nscn = shnum; in _libelf_ehdr()
H A Delf_scn.c66 size_t fsz, i, shnum; in _libelf_load_section_headers() local
77 shnum > SIZE_MAX / fsz || \ in _libelf_load_section_headers()
78 fsz * shnum > rawsize - shoff) { \ in _libelf_load_section_headers()
88 shnum = e->e_u.e_elf.e_nscn; in _libelf_load_section_headers()
120 for (; i < shnum; i++, src += fsz) { in _libelf_load_section_headers()
H A Delf_update.c515 size_t phnum, shnum; in _libelf_resync_elf() local
573 shnum = e->e_u.e_elf.e_nscn; in _libelf_resync_elf()
669 if (shnum) { in _libelf_resync_elf()
670 fsz = _libelf_fsize(ELF_T_SHDR, ec, eh_version, shnum); in _libelf_resync_elf()
695 _libelf_setshnum(e, ehdr, ec, shnum); in _libelf_resync_elf()
/freebsd/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 CAST(off_t, elf_getu(swap, elfhdr.e_shoff)), shnum,
H A Dreadelf.c1831 uint16_t type, phnum, shnum, notecount; in file_tryelf() local
/freebsd/crypto/openssl/util/perl/
H A Dcheckhandshake.pm89 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;
/freebsd/usr.sbin/crunch/crunchide/
H A Dexec_elf32.c239 Elf_Half shnum; in ELFNAMEEND() local
246 shnum = xe16toh(ehdr.e_shnum); in ELFNAMEEND()
257 for (i = 0; i < shnum; i++) { in ELFNAMEEND()
306 layoutp[shnum].shdr = &shdrshdr; in ELFNAMEEND()
309 for (i = shnum; i-- != 0;) { in ELFNAMEEND()
311 r = shnum; in ELFNAMEEND()
329 ++shnum; in ELFNAMEEND()
348 for (i = 0; i < shnum; i++) { in ELFNAMEEND()
435 for (i = strtabidx + 1; i < shnum; i++) { in ELFNAMEEND()
447 for (i = shnum; i-- != 0;) { in ELFNAMEEND()
[all …]
/freebsd/cddl/contrib/opensolaris/lib/libctf/common/
H A Dctf_lib.c220 size_t shstrndx, shnum; in ctf_fdopen() local
303 shnum = hdr.e64.e_shnum; in ctf_fdopen()
307 if ((shstrndx == SHN_XINDEX) || (shnum == 0)) { in ctf_fdopen()
316 shnum = x32.sh_size; in ctf_fdopen()
326 shnum = x64.sh_size; in ctf_fdopen()
331 if (shstrndx >= shnum) in ctf_fdopen()
334 nbytes = sizeof (GElf_Shdr) * shnum; in ctf_fdopen()
346 nbytes = sizeof (Elf32_Shdr) * shnum; in ctf_fdopen()
355 for (i = 0; i < shnum; i++) in ctf_fdopen()
387 for (i = 0; i < shnum; i++) { in ctf_fdopen()
[all …]
/freebsd/usr.bin/elfdump/
H A Delfdump.c483 uint64_t shnum; in elf_get_shnum() local
485 shnum = elf_get_quarter(e, e, E_SHNUM); in elf_get_shnum()
486 if (shnum == 0) in elf_get_shnum()
488 return shnum; in elf_get_shnum()
511 u_int64_t shnum; in main() local
617 shnum = elf_get_shnum(e, sh); in main()
624 shnum = 0; in main()
727 u_int64_t shnum; in elf_print_ehdr() local
760 shnum = elf_get_shnum(e, sh); in elf_print_ehdr()
813 u_int64_t shnum; in elf_print_shdr() local
[all …]
/freebsd/contrib/elftoolchain/elfdump/
H A Delfdump.c121 size_t shnum; /* #sections. */ member
380 if ((uint64_t)ndx < ed->shnum) in sh_name()
1121 if (ed->shnum == 0) in load_sections()
1150 if (ndx >= ed->shnum) { in load_sections()
1232 if (symtab >= ed->shnum) in get_symbol_name()
1247 if (sym.st_shndx < ed->shnum) { in get_symbol_name()
1474 if (j >= ed->shnum) { in get_versym()
1581 for (i = 0; i < ed->shnum; i++) in elf_print_symtabs()
1608 if ((size_t)i >= ed->shnum) in elf_print_dynamic()
2068 if ((size_t)i >= ed->shnum) in elf_print_note()
[all …]
/freebsd/contrib/elftoolchain/readelf/
H A Dreadelf.c2538 if (re->shnum == 0) in dump_phdr()
2629 if (re->shnum == 0) { in dump_shdr()
3055 if (s->link >= re->shnum) in dump_rel()
3138 if (s->link >= re->shnum) in dump_rela()
3252 if (s->link >= re->shnum) in dump_symtab()
3525 if (s->link >= re->shnum) in dump_gnu_hash()
3975 if (s->link >= re->shnum) in dump_verdef()
4050 if (s->link >= re->shnum) in dump_verneed()
4317 if (*w >= re->shnum) { in dump_section_groups()
7269 if (ndx >= re->shnum) { in load_sections()
[all …]
/freebsd/contrib/elftoolchain/nm/
H A Dnm.c654 get_sym(Elf *elf, struct sym_head *headp, int shnum, size_t dynndx, in get_sym() argument
674 for (i = 1; i < shnum; i++) { in get_sym()
1200 size_t i, shstrndx, shnum, dynndx, strndx; in read_elf() local
1226 if (!elf_getshnum(elf, &shnum)) { in read_elf()
1234 if (shnum == 0) { in read_elf()
1245 if ((type_table = malloc(sizeof(char) * shnum)) == NULL) { in read_elf()
1251 if ((sec_table = calloc(shnum, sizeof(char *))) == NULL) { in read_elf()
1263 for (i = 1; i < shnum; ++i) { in read_elf()
1436 type_table, (void *) sec_table, shnum); in read_elf()
1442 p_data.sh_num = shnum; in read_elf()
[all …]
/freebsd/lib/libc/gen/
H A Dnlist.c261 elf_sym_to_nlist(struct nlist *nl, Elf_Sym *s, Elf_Shdr *shdr, int shnum) in elf_sym_to_nlist() argument
275 if (s->st_shndx >= shnum) in elf_sym_to_nlist()
/freebsd/contrib/llvm-project/lld/ELF/Arch/
H A DARM.cpp1403 const auto shnum = osIsPairs.size() + 1; in writeARMCmseImportLib() local
1405 sectionHeaderOff + shnum * sizeof(typename ELFT::Shdr); in writeARMCmseImportLib()
1438 eHdr->e_shnum = shnum; in writeARMCmseImportLib()