/external/elfutils/libelf/ |
D | elf_update.c | 44 write_file (Elf *elf, off_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()
|
D | elf32_updatenull.c | 52 size_t shnum, int *change_bop) in ELFW() 98 if (unlikely (shnum >= SHN_LORESERVE)) in ELFW() 104 update_if_changed (ehdr->e_shnum, shnum, in ELFW() 127 __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) in __elfw2() 136 if (ELFW(default_ehdr,LIBELFBITS) (elf, ehdr, shnum, change_bop) != 0) in __elfw2() 170 if (shnum > 0) in __elfw2() 178 if (shnum >= SHN_LORESERVE) in __elfw2() 185 shnum, scn0->shdr_flags); in __elfw2() 420 + (elf_typesize (LIBELFBITS, ELF_T_SHDR, shnum)))); in __elfw2() 435 size += elf_typesize (LIBELFBITS, ELF_T_SHDR, shnum); in __elfw2()
|
D | elf32_getshdr.c | 62 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()
|
D | elf32_updatefile.c | 128 __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() 428 for (size_t cnt = 0; cnt < shnum; ++cnt) in __elfw2() 468 + ehdr->e_shentsize * shnum); in __elfw2() 520 __elfw2(LIBELFBITS,updatefile) (Elf *elf, int change_bo, size_t shnum) in __elfw2() [all …]
|
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)
|
D | ChangeLog | 150 * elf32_updatefile.c (updatemmap): Use shnum, not ehdr->e_shnum.
|
/external/elfutils/tests/ |
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 == 2); /* section zero is also created. */ in test()
|
/external/vixl/examples/aarch32/ |
D | disasm-a32.cc | 110 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/elfutils/src/ |
D | elfcompress.c | 276 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 …]
|
D | strip.c | 1130 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 …]
|
D | unstrip.c | 380 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() 615 Elf *elf, bool rel, Elf_Scn *symscn, size_t shnum) in add_new_section_symbols() argument 617 const size_t added = shnum - old_shnum; in add_new_section_symbols() 656 for (size_t i = old_shnum; i < shnum; ++i) in add_new_section_symbols() 697 size_t shnum, size_t shstrndx, in check_symtab_section_symbols() argument 705 return add_new_section_symbols (oscn, n, elf, rel, scn, shnum); in check_symtab_section_symbols() 1110 uint_fast16_t shnum; /* prelink doesn't handle > SHN_LORESERVE. */ in find_alloc_sections_prelink() local 1114 shnum = ehdr.e32.e_shnum; in find_alloc_sections_prelink() [all …]
|
D | elflint.c | 126 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 …]
|
D | nm.c | 732 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() 856 shnum)); in show_symbols_sysv()
|
D | readelf.c | 276 static size_t shnum; variable 921 if (unlikely (elf_getshdrnum (ebl->elf, &shnum) < 0)) in process_elf_file() 1223 for (cnt = 0; cnt < shnum; ++cnt) in print_shdr() 1431 for (size_t inner = 1; inner < shnum; ++inner) in print_phdr() 2475 sizeof (scnbuf), NULL, shnum), in handle_symtab() 12285 if (shnum != 0) in handle_notes()
|
D | ChangeLog | 178 (find_alloc_sections_prelink): Document shnum usage. 182 * elflint.c (check_elf_header): Use shnum instead of e_shnum for all 845 * unstrip.c: Check shnum for 0 before subtracting from it. 862 * elflint.c (check_elf_header): Sanity check phnum and shnum.
|
/external/elfutils/libdwfl/ |
D | dwfl_module_getdwarf.c | 336 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/elfutils/libebl/ |
D | eblsectionname.c | 40 const char *scnnames[], size_t shnum) in ebl_section_name() argument 58 && (size_t) section < shnum) in ebl_section_name()
|
D | libebl.h | 122 const char *scnnames[], size_t shnum);
|
/external/toybox/toys/posix/ |
D | file.c | 35 phentsize, phnum, shsize, shnum; local 108 shnum = elf_int(toybuf+48+12*bits, 2); 150 if (shoff+i*shnum>TT.len) goto bad; 151 for (i = 0; i<shnum; i++) {
|
/external/elfutils/config/ |
D | elfutils.spec.in | 252 - libelf, libdw and all tools now handle extended shnum and shstrndx
|
/external/elfutils/ |
D | NEWS | 31 libelf, libdw and all tools now handle extended shnum and shstrndx correctly.
|
/external/elfutils/po/ |
D | uk.po | 1628 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" 6858 msgid "overflow with shnum = %zu in '%s' section"
|
D | pl.po | 1618 msgid "Can only check %u headers, shnum was %u\n" 2934 "zeroth section has nonzero size value while ELF header has nonzero shnum " 2938 "wartość shnum\n" 6807 msgid "overflow with shnum = %zu in '%s' section" 6808 msgstr "przepełnienie z shnum = %zu w sekcji „%s”"
|
D | de.po | 1618 msgid "Can only check %u headers, shnum was %u\n" 2774 "zeroth section has nonzero size value while ELF header has nonzero shnum " 6274 msgid "overflow with shnum = %zu in '%s' section"
|
D | ja.po | 1620 msgid "Can only check %u headers, shnum was %u\n" 2855 "zeroth section has nonzero size value while ELF header has nonzero shnum " 6539 msgid "overflow with shnum = %zu in '%s' section"
|