Lines Matching defs:shnum
382 symtab_count_leading_section_symbols (Elf *elf, Elf_Scn *scn, size_t shnum,
388 for (size_t i = 1; i < shnum; ++i)
412 return shnum;
626 Elf *elf, bool rel, Elf_Scn *symscn, size_t shnum)
628 const size_t added = shnum - old_shnum;
668 for (size_t i = old_shnum; i < shnum; ++i)
710 size_t shnum, size_t shstrndx,
718 return add_new_section_symbols (oscn, n, elf, rel, scn, shnum);
1142 uint_fast16_t shnum; /* prelink doesn't handle > SHN_LORESERVE. */
1146 shnum = ehdr.e32.e_shnum;
1151 shnum = ehdr.e64.e_shnum;
1156 if (unlikely (shnum == 0 || shnum > SIZE_MAX / shsize + 1))
1157 error_exit (0, _("overflow with shnum = %zu in '%s' section"),
1158 (size_t) shnum, ".gnu.prelink_undo");
1160 --shnum;
1164 src.d_size = gelf_fsize (main, ELF_T_SHDR, shnum, EV_CURRENT);
1171 const size_t shdr_bytes = shnum * shsize;
1179 undo_sections = xmalloc (shnum * sizeof undo_sections[0]);
1180 for (size_t i = 0; i < shnum; ++i)
1183 Elf32_Shdr (*s32)[shnum] = shdr;
1184 Elf64_Shdr (*s64)[shnum] = shdr;