Home
last modified time | relevance | path

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

12

/external/elfutils/libelf/
Delf_update.c44 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()
Delf32_updatenull.c56 size_t shnum, int *change_bop) in ELFW()
102 if (unlikely (shnum >= SHN_LORESERVE)) in ELFW()
108 update_if_changed (ehdr->e_shnum, shnum, in ELFW()
131 __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) in __elfw2()
140 if (ELFW(default_ehdr,LIBELFBITS) (elf, ehdr, shnum, change_bop) != 0) in __elfw2()
174 if (shnum > 0) in __elfw2()
182 if (shnum >= SHN_LORESERVE) in __elfw2()
189 shnum, scn0->shdr_flags); in __elfw2()
427 + (elf_typesize (LIBELFBITS, ELF_T_SHDR, shnum)))); in __elfw2()
442 size += elf_typesize (LIBELFBITS, ELF_T_SHDR, shnum); in __elfw2()
Delf32_getshdr.c62 size_t shnum; in ElfW2() local
63 if (__elf_getshdrnum_rdlock (elf, &shnum) != 0 in ElfW2()
64 || shnum > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Shdr))) in ElfW2()
66 size_t size = shnum * sizeof (ElfW2(LIBELFBITS,Shdr)); in ElfW2()
138 for (size_t cnt = 0; cnt < shnum; ++cnt) in ElfW2()
156 && shdr[cnt].sh_link < shnum) in ElfW2()
187 for (size_t cnt = 0; cnt < shnum; ++cnt) in ElfW2()
216 for (size_t cnt = 0; cnt < shnum; ++cnt) in ElfW2()
Delf32_updatefile.c128 __elfw2(LIBELFBITS,updatemmap) (Elf *elf, int change_bo, size_t shnum) in __elfw2()
215 if (shnum > 0) in __elfw2()
217 if (unlikely (shnum > SIZE_MAX / sizeof (Elf_Scn *))) in __elfw2()
221 Elf_Scn **scns = (Elf_Scn **) malloc (shnum * sizeof (Elf_Scn *)); in __elfw2()
229 char *const shdr_end = shdr_start + shnum * ehdr->e_shentsize; in __elfw2()
240 for (size_t cnt = 0; cnt < shnum; ++cnt) in __elfw2()
296 for (size_t cnt = 0; cnt < shnum; ++cnt) in __elfw2()
443 for (size_t cnt = 0; cnt < shnum; ++cnt) in __elfw2()
483 + ehdr->e_shentsize * shnum); in __elfw2()
535 __elfw2(LIBELFBITS,updatefile) (Elf *elf, int change_bo, size_t shnum) in __elfw2()
[all …]
DlibelfP.h471 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)
/external/elfutils/tests/
Delfshphehdr.c75 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 == 2); /* section zero is also created. */ in test()
Delfcopy.c188 size_t shnum; in copy_elf() local
191 if (elf_getshdrnum (elfa, &shnum) < 0) in copy_elf()
197 offs = (GElf_Off *) malloc (shnum * sizeof (GElf_Off)); in copy_elf()
/external/vixl/examples/aarch32/
Ddisasm-a32.cc110 for (int shnum = 1; shnum < nsections_; shnum++) { in Locate() local
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()
/external/toybox/toys/pending/
Dreadelf.c39 int bits, shnum, shentsize, phentsize;
60 if (i >= TT.shnum || shdr > TT.elf+TT.size-TT.shentsize) { in get_sh()
91 if (!errno && !*end && i < TT.shnum) { in find_section()
97 for (i=0; i<TT.shnum; i++) { in find_section()
323 TT.shnum = TT.elf_int(TT.elf+48+12*TT.bits, 2); in scan_elf()
365 printf(" Number of section headers: %d\n", TT.shnum); in scan_elf()
371 if (!TT.shnum) printf("\nThere are no sections in this file.\n"); in scan_elf()
375 TT.shnum, TT.shoff); in scan_elf()
385 for (i=0; i<TT.shnum; i++) { in scan_elf()
404 if (FLAG(S) && TT.shnum) { in scan_elf()
[all …]
/external/elfutils/src/
Delfcompress.c276 size_t shnum = 0; in process_file() local
293 for (size_t i = 0; i < shnum / WORD_BITS + 1; i++) in process_file()
322 for (size_t n = 0; n < shnum; n++) in process_file()
383 if (elf_getshdrnum (elf, &shnum) != 0) in process_file()
390 if (shnum == 0) in process_file()
396 sections = xcalloc (shnum / 8 + 1, sizeof (unsigned int)); in process_file()
455 if (ndx > shnum) in process_file()
458 ndx, shnum); in process_file()
568 scnstrents = xmalloc (shnum in process_file()
570 scnnames = xcalloc (shnum, sizeof (char *)); in process_file()
[all …]
Dstrip.c1130 size_t shnum; in handle_elf() local
1131 if (unlikely (elf_getshdrnum (elf, &shnum) < 0)) in handle_elf()
1138 if (shstrndx >= shnum) in handle_elf()
1147 if ((shnum + 2) * sizeof (struct shdr_info) > MAX_STACK_ALLOC) in handle_elf()
1148 shdr_info = (struct shdr_info *) xcalloc (shnum + 2, in handle_elf()
1152 shdr_info = (struct shdr_info *) alloca ((shnum + 2) in handle_elf()
1154 memset (shdr_info, '\0', (shnum + 2) * sizeof (struct shdr_info)); in handle_elf()
1225 if (shdr_info[cnt].old_sh_link >= shnum) in handle_elf()
1261 if (grpref[inner] < shnum) in handle_elf()
1313 for (cnt = 1; cnt < shnum; ++cnt) in handle_elf()
[all …]
Dunstrip.c380 symtab_count_leading_section_symbols (Elf *elf, Elf_Scn *scn, size_t shnum, in symtab_count_leading_section_symbols() argument
386 for (size_t i = 1; i < shnum; ++i) in symtab_count_leading_section_symbols()
410 return shnum; in symtab_count_leading_section_symbols()
619 Elf *elf, bool rel, Elf_Scn *symscn, size_t shnum) in add_new_section_symbols() argument
621 const size_t added = shnum - old_shnum; in add_new_section_symbols()
661 for (size_t i = old_shnum; i < shnum; ++i) in add_new_section_symbols()
703 size_t shnum, size_t shstrndx, in check_symtab_section_symbols() argument
711 return add_new_section_symbols (oscn, n, elf, rel, scn, shnum); in check_symtab_section_symbols()
1120 uint_fast16_t shnum; /* prelink doesn't handle > SHN_LORESERVE. */ in find_alloc_sections_prelink() local
1124 shnum = ehdr.e32.e_shnum; in find_alloc_sections_prelink()
[all …]
Delflint.c126 static unsigned int shnum; variable
306 if ((unsigned int) idx > shnum) in section_name()
416 shnum = ehdr->e_shnum; in check_elf_header()
441 shnum = shdr->sh_size; in check_elf_header()
451 if (shdr != NULL && shdr->sh_link < shnum) in check_elf_header()
454 else if (shstrndx >= shnum) in check_elf_header()
463 for (scnt = 1; scnt < shnum; ++scnt) in check_elf_header()
472 if (scnt < shnum) in check_elf_header()
473 ERROR (gettext ("Can only check %u headers, shnum was %u\n"), scnt, shnum); in check_elf_header()
474 shnum = scnt; in check_elf_header()
[all …]
Dnm.c732 size_t shnum; in show_symbols_sysv() local
733 if (elf_getshdrnum (ebl->elf, &shnum) < 0) in show_symbols_sysv()
736 bool scnnames_malloced = shnum * sizeof (const char *) > 128 * 1024; in show_symbols_sysv()
739 scnnames = (const char **) xmalloc (sizeof (const char *) * shnum); in show_symbols_sysv()
741 scnnames = (const char **) alloca (sizeof (const char *) * shnum); in show_symbols_sysv()
854 shnum)); in show_symbols_sysv()
Dreadelf.c287 static size_t shnum; variable
951 if (unlikely (elf_getshdrnum (ebl->elf, &shnum) < 0)) in process_elf_file()
1258 for (cnt = 0; cnt < shnum; ++cnt) in print_shdr()
1466 for (size_t inner = 1; inner < shnum; ++inner) in print_phdr()
2510 sizeof (scnbuf), NULL, shnum), in handle_symtab()
12409 if (shnum != 0) in handle_notes()
DChangeLog325 (find_alloc_sections_prelink): Document shnum usage.
329 * elflint.c (check_elf_header): Use shnum instead of e_shnum for all
992 * unstrip.c: Check shnum for 0 before subtracting from it.
1009 * elflint.c (check_elf_header): Sanity check phnum and shnum.
/external/elfutils/libebl/
Deblsectionname.c40 const char *scnnames[], size_t shnum) in ebl_section_name() argument
58 && (size_t) section < shnum) in ebl_section_name()
Dlibebl.h116 const char *scnnames[], size_t shnum);
/external/elfutils/libdwfl/
Ddwfl_module_getdwarf.c336 uint_fast16_t shnum; in find_prelink_address_sync() local
343 shnum = ehdr.e32.e_shnum; in find_prelink_address_sync()
351 shnum = ehdr.e64.e_shnum; in find_prelink_address_sync()
356 if (unlikely (shnum >= SHN_LORESERVE) || unlikely(shnum == 0) in find_prelink_address_sync()
359 + (shnum - 1) * shentsize))) in find_prelink_address_sync()
362 --shnum; in find_prelink_address_sync()
440 src.d_size = gelf_fsize (mod->main.elf, ELF_T_SHDR, shnum, EV_CURRENT); in find_prelink_address_sync()
443 if (unlikely (shnum > SIZE_MAX / shdr_size)) in find_prelink_address_sync()
445 const size_t shdrs_bytes = shnum * shdr_size; in find_prelink_address_sync()
497 Elf32_Shdr (*s32)[shnum] = shdrs; in find_prelink_address_sync()
[all …]
/external/toybox/toys/posix/
Dfile.c37 phentsize, phnum, shsize, shnum; local
92 shnum = elf_int(toybuf+48+12*bits, 2);
134 if (shoff+i*shnum>TT.len) goto bad;
135 for (i = 0; i<shnum; i++) {
/external/elfutils/debuginfod/
Ddebuginfod.cxx1476 size_t shnum; in elf_classify() local
1477 int rc = elf_getshdrnum (elf, &shnum); in elf_classify()
1482 for (size_t sc = 0; sc < shnum; sc++) in elf_classify()
/external/toybox/android/linux/generated/
Dglobals.h800 int bits, shnum, shentsize, phentsize; member
/external/toybox/android/mac/generated/
Dglobals.h800 int bits, shnum, shentsize, phentsize; member
/external/toybox/android/device/generated/
Dglobals.h800 int bits, shnum, shentsize, phentsize; member
/external/elfutils/po/
Duk.po1628 msgid "Can only check %u headers, shnum was %u\n"
2970 "zeroth section has nonzero size value while ELF header has nonzero shnum "
2974 "ненульове значення shnum\n"
6884 msgid "overflow with shnum = %zu in '%s' section"

12