/third_party/elfutils/libelf/ |
H A D | elf_update.c | 42 write_file (Elf *elf, int64_t size, int change_bo, size_t shnum) in write_file() argument 122 ? __elf32_updatemmap (elf, change_bo, shnum) in write_file() 123 : __elf64_updatemmap (elf, change_bo, shnum)) != 0) in write_file() 131 ? __elf32_updatefile (elf, change_bo, shnum) in write_file() 132 : __elf64_updatefile (elf, change_bo, shnum)) != 0) in write_file() 170 size_t shnum; in elf_update() local 202 shnum = (elf->state.elf.scns_last->cnt == 0 in elf_update() 210 ? __elf32_updatenull_wrlock (elf, &change_bo, shnum) in elf_update() 211 : __elf64_updatenull_wrlock (elf, &change_bo, shnum)); in elf_update() 231 size = write_file (elf, size, change_bo, shnum); in elf_update() [all...] |
H A D | elf32_getshdr.c | 60 size_t shnum; in ElfW2() 61 if (__elf_getshdrnum_rdlock (elf, &shnum) != 0 in ElfW2() 62 || shnum > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Shdr))) in ElfW2() 64 size_t size = shnum * sizeof (ElfW2(LIBELFBITS,Shdr)); in ElfW2() 136 for (size_t cnt = 0; cnt < shnum; ++cnt) in ElfW2() 154 && shdr[cnt].sh_link < shnum) in ElfW2() 185 for (size_t cnt = 0; cnt < shnum; ++cnt) in ElfW2() 214 for (size_t cnt = 0; cnt < shnum; ++cnt) in ElfW2()
|
H A D | elf32_updatefile.c | 125 __elfw2(LIBELFBITS,updatemmap) (Elf *elf, int change_bo, size_t shnum) in __elfw2() 212 if (shnum > 0) in __elfw2() 214 if (unlikely (shnum > SIZE_MAX / sizeof (Elf_Scn *))) in __elfw2() 218 Elf_Scn **scns = malloc (shnum * sizeof (Elf_Scn *)); in __elfw2() 226 char *const shdr_end = shdr_start + shnum * ehdr->e_shentsize; in __elfw2() 237 for (size_t cnt = 0; cnt < shnum; ++cnt) in __elfw2() 293 for (size_t cnt = 0; cnt < shnum; ++cnt) in __elfw2() 440 for (size_t cnt = 0; cnt < shnum; ++cnt) in __elfw2() 480 + ehdr->e_shentsize * shnum); in __elfw2() 532 __elfw2(LIBELFBITS,updatefile) (Elf *elf, int change_bo, size_t shnum) in __elfw2() [all...] |
H A D | elf32_updatenull.c | 54 size_t shnum, int *change_bop) in ELFW() 100 if (unlikely (shnum >= SHN_LORESERVE)) in ELFW() 106 update_if_changed (ehdr->e_shnum, shnum, in ELFW() 129 __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) in __elfw2() 138 if (ELFW(default_ehdr,LIBELFBITS) (elf, ehdr, shnum, change_bop) != 0) in __elfw2() 172 if (shnum > 0) in __elfw2() 180 if (shnum >= SHN_LORESERVE) in __elfw2() 187 shnum, scn0->shdr_flags); in __elfw2() 437 + (elf_typesize (LIBELFBITS, ELF_T_SHDR, shnum)))); in __elfw2() 452 size += elf_typesize (LIBELFBITS, ELF_T_SHDR, shnum); in __elfw2() [all...] |
H A D | libelfP.h | 471 size_t shnum) internal_function; 473 size_t shnum) internal_function; 475 extern int __elf32_updatemmap (Elf *elf, int change_bo, size_t shnum) 477 extern int __elf64_updatemmap (Elf *elf, int change_bo, size_t shnum) 479 extern int __elf32_updatefile (Elf *elf, int change_bo, size_t shnum) 481 extern int __elf64_updatefile (Elf *elf, int change_bo, size_t shnum)
|
/third_party/node/deps/openssl/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...] |
/third_party/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...] |
/third_party/elfutils/tests/ |
H A D | elfshphehdr.c | 75 size_t shnum; in test() local 76 check_elf ("elf_getshdrnum", elf_getshdrnum (elf, &shnum) == 0); in test() 77 check ("shnum == 0", shnum == 0); in test() 102 check_elf ("elf_getshdrnum", elf_getshdrnum (elf, &shnum) == 0); in test() 103 check ("shnum == 0", shnum == 0); in test() 126 check_elf ("elf_getshdrnum", elf_getshdrnum (elf, &shnum) == 0); in test() 127 check ("shnum == 1", shnum in test() [all...] |
H A D | elfcopy.c | 188 size_t shnum; in copy_elf() local 191 if (elf_getshdrnum (elfa, &shnum) < 0) in copy_elf() 197 offs = malloc (shnum * sizeof (GElf_Off)); in copy_elf()
|
/third_party/vixl/examples/aarch32/ |
H A D | disasm-a32.cc | 110 for (int shnum = 1; shnum < nsections_; shnum++) { in Locate() 111 if ((shdr_[shnum].sh_type == type) && in Locate() 112 std::string(shstrtab_ + shdr_[shnum].sh_name) == section_name) { in Locate() 113 return &shdr_[shnum]; in Locate()
|
/third_party/elfutils/src/ |
H A D | elfcompress.c | 261 get_sections (unsigned int *sections, size_t shnum) in get_sections() argument 264 for (size_t i = 0; i < shnum / WORD_BITS + 1; i++) in get_sections() 300 size_t shnum = 0; in process_file() local 353 if (elf_getshdrnum (elf, &shnum) != 0) in process_file() 360 if (shnum == 0) in process_file() 366 sections = xcalloc (shnum / 8 + 1, sizeof (unsigned int)); in process_file() 425 if (ndx > shnum) in process_file() 428 ndx, shnum); in process_file() 520 if (foutput == NULL && get_sections (sections, shnum) == 0) in process_file() 536 scnstrents = xmalloc (shnum in process_file() [all...] |
H A D | strip.c | 1185 size_t shnum; in handle_elf() local 1186 if (unlikely (elf_getshdrnum (elf, &shnum) < 0)) in handle_elf() 1193 if (shstrndx >= shnum) in handle_elf() 1202 if ((shnum + 2) * sizeof (struct shdr_info) > MAX_STACK_ALLOC) in handle_elf() 1203 shdr_info = xcalloc (shnum + 2, sizeof (struct shdr_info)); in handle_elf() 1206 shdr_info = (struct shdr_info *) alloca ((shnum + 2) in handle_elf() 1208 memset (shdr_info, '\0', (shnum + 2) * sizeof (struct shdr_info)); in handle_elf() 1279 if (shdr_info[cnt].old_sh_link >= shnum) in handle_elf() 1315 if (grpref[inner] < shnum) in handle_elf() 1367 for (cnt = 1; cnt < shnum; in handle_elf() [all...] |
H A D | unstrip.c | 382 symtab_count_leading_section_symbols (Elf *elf, Elf_Scn *scn, size_t shnum, in symtab_count_leading_section_symbols() 388 for (size_t i = 1; i < shnum; ++i) in symtab_count_leading_section_symbols() 412 return shnum; in symtab_count_leading_section_symbols() 626 Elf *elf, bool rel, Elf_Scn *symscn, size_t shnum) in add_new_section_symbols() 628 const size_t added = shnum - old_shnum; in add_new_section_symbols() 668 for (size_t i = old_shnum; i < shnum; ++i) in add_new_section_symbols() 710 size_t shnum, size_t shstrndx, in check_symtab_section_symbols() 718 return add_new_section_symbols (oscn, n, elf, rel, scn, shnum); in check_symtab_section_symbols() 1142 uint_fast16_t shnum; /* prelink doesn't handle > SHN_LORESERVE. */ in find_alloc_sections_prelink() 1146 shnum in find_alloc_sections_prelink() 381 symtab_count_leading_section_symbols(Elf *elf, Elf_Scn *scn, size_t shnum, Elf_Data *newsymdata) symtab_count_leading_section_symbols() argument 624 add_new_section_symbols(Elf_Scn *old_symscn, size_t old_shnum, Elf *elf, bool rel, Elf_Scn *symscn, size_t shnum) add_new_section_symbols() argument 708 check_symtab_section_symbols(Elf *elf, bool rel, Elf_Scn *scn, size_t shnum, size_t shstrndx, Elf_Scn *oscn, size_t oshnum, size_t oshstrndx, size_t debuglink) check_symtab_section_symbols() argument 1140 uint_fast16_t shnum; /* prelink doesn't handle > SHN_LORESERVE. */ find_alloc_sections_prelink() local [all...] |
H A D | elflint.c | 125 static unsigned int shnum; variable 305 if ((unsigned int) idx > shnum) in section_name() 415 shnum = ehdr->e_shnum; in check_elf_header() 440 shnum = shdr->sh_size; in check_elf_header() 450 if (shdr != NULL && shdr->sh_link < shnum) in check_elf_header() 453 else if (shstrndx >= shnum) in check_elf_header() 462 for (scnt = 1; scnt < shnum; ++scnt) in check_elf_header() 471 if (scnt < shnum) in check_elf_header() 472 ERROR (_("Can only check %u headers, shnum was %u\n"), scnt, shnum); in check_elf_header() [all...] |
H A D | nm.c | 729 size_t shnum; in show_symbols_sysv() local 730 if (elf_getshdrnum (ebl->elf, &shnum) < 0) in show_symbols_sysv() 733 bool scnnames_malloced = shnum * sizeof (const char *) > 128 * 1024; in show_symbols_sysv() 736 scnnames = xmalloc (sizeof (const char *) * shnum); in show_symbols_sysv() 738 scnnames = (const char **) alloca (sizeof (const char *) * shnum); in show_symbols_sysv() 866 shnum)); in show_symbols_sysv()
|
H A D | readelf.c | 292 static size_t shnum; variable 979 if (unlikely (elf_getshdrnum (ebl->elf, &shnum) < 0)) in process_elf_file() 1282 for (cnt = 0; cnt < shnum; ++cnt) in print_shdr() 1490 for (size_t inner = 1; inner < shnum; ++inner) in print_phdr() 2587 sizeof (scnbuf), NULL, shnum), in handle_symtab() 12767 if (shnum != 0) in handle_notes()
|
/third_party/elfutils/libdwfl/ |
H A D | dwfl_module_getdwarf.c | 335 uint_fast16_t shnum; in find_prelink_address_sync() local 342 shnum = ehdr.e32.e_shnum; in find_prelink_address_sync() 350 shnum = ehdr.e64.e_shnum; in find_prelink_address_sync() 355 if (unlikely (shnum >= SHN_LORESERVE) || unlikely(shnum == 0) in find_prelink_address_sync() 358 + (shnum - 1) * shentsize))) in find_prelink_address_sync() 361 --shnum; in find_prelink_address_sync() 439 src.d_size = gelf_fsize (mod->main.elf, ELF_T_SHDR, shnum, EV_CURRENT); in find_prelink_address_sync() 442 if (unlikely (shnum > SIZE_MAX / shdr_size)) in find_prelink_address_sync() 444 const size_t shdrs_bytes = shnum * shdr_siz in find_prelink_address_sync() [all...] |
/third_party/elfutils/libebl/ |
H A D | eblsectionname.c | 40 const char *scnnames[], size_t shnum) in ebl_section_name() 58 && (size_t) section < shnum) in ebl_section_name() 39 ebl_section_name(Ebl *ebl, int section, int xsection, char *buf, size_t len, const char *scnnames[], size_t shnum) ebl_section_name() argument
|
H A D | libebl.h | 118 const char *scnnames[], size_t shnum);
|
/third_party/toybox/toys/posix/ |
H A D | file.c | 37 phentsize, phnum, shsize, shnum; in do_elf_file() local 110 shnum = elf_int(toybuf+48+12*bits, 2); in do_elf_file() 152 if (shoff+i*shnum>TT.len) goto bad; in do_elf_file() 153 for (i = 0; i<shnum; i++) { in do_elf_file() 214 // zero through elf shnum, just in case in do_regular_file()
|
/third_party/elfutils/debuginfod/ |
H A D | debuginfod.cxx | 2938 size_t shnum; in elf_classify() local 2939 int rc = elf_getshdrnum (elf, &shnum); in elf_classify() 2944 for (size_t sc = 0; sc < shnum; sc++) in elf_classify()
|