Home
last modified time | relevance | path

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

/openbsd/lib/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.c53 size_t fsz, i, shnum; in _libelf_load_section_headers() local
64 shnum > SIZE_MAX / fsz || \ in _libelf_load_section_headers()
65 fsz * shnum > rawsize - shoff) { \ in _libelf_load_section_headers()
75 shnum = e->e_u.e_elf.e_nscn; in _libelf_load_section_headers()
107 for (; i < shnum; i++, src += fsz) { in _libelf_load_section_headers()
H A Delf_update.c514 size_t phnum, shnum; in _libelf_resync_elf() local
572 shnum = e->e_u.e_elf.e_nscn; in _libelf_resync_elf()
668 if (shnum) { in _libelf_resync_elf()
669 fsz = _libelf_fsize(ELF_T_SHDR, ec, eh_version, shnum); in _libelf_resync_elf()
694 _libelf_setshnum(e, ehdr, ec, shnum); in _libelf_resync_elf()
/openbsd/gnu/usr.bin/binutils/bfd/
H A Delf.c465 unsigned int i, shnum; in setup_group() local
469 shnum = elf_numsections (abfd); in setup_group()
471 for (i = 0; i < shnum; i++) in setup_group()
492 for (i = 0; i < shnum; i++) in setup_group()
535 if (idx >= shnum) in setup_group()
/openbsd/gnu/usr.bin/binutils-2.17/bfd/
H A Delf.c489 unsigned int i, shnum; in setup_group() local
493 shnum = elf_numsections (abfd); in setup_group()
495 for (i = 0; i < shnum; i++) in setup_group()
520 for (i = 0; i < shnum; i++) in setup_group()
564 if (idx >= shnum) in setup_group()