/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 104 ? __elf32_updatemmap (elf, change_bo, shnum) in write_file() 105 : __elf64_updatemmap (elf, change_bo, shnum)) != 0) in write_file() 113 ? __elf32_updatefile (elf, change_bo, shnum) in write_file() 114 : __elf64_updatefile (elf, change_bo, shnum)) != 0) in write_file() 152 size_t shnum; in elf_update() local 184 shnum = (elf->state.elf.scns_last->cnt == 0 in elf_update() 192 ? __elf32_updatenull_wrlock (elf, &change_bo, shnum) in elf_update() 193 : __elf64_updatenull_wrlock (elf, &change_bo, shnum)); in elf_update() 213 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() 181 if (shnum > 0) in __elfw2() 188 if (shnum >= SHN_LORESERVE) in __elfw2() 195 shnum, scn0->shdr_flags); in __elfw2() 425 + (elf_typesize (LIBELFBITS, ELF_T_SHDR, shnum)))); in __elfw2() 440 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 | 129 __elfw2(LIBELFBITS,updatemmap) (Elf *elf, int change_bo, size_t shnum) in __elfw2() 226 if (shnum > 0) in __elfw2() 228 if (unlikely (shnum > SIZE_MAX / sizeof (Elf_Scn *))) in __elfw2() 232 Elf_Scn **scns = (Elf_Scn **) malloc (shnum * sizeof (Elf_Scn *)); in __elfw2() 255 for (size_t cnt = 0; cnt < shnum; ++cnt) in __elfw2() 309 for (size_t cnt = 0; cnt < shnum; ++cnt) in __elfw2() 419 for (size_t cnt = 0; cnt < shnum; ++cnt) in __elfw2() 459 + ehdr->e_shentsize * shnum); in __elfw2() 511 __elfw2(LIBELFBITS,updatefile) (Elf *elf, int change_bo, size_t shnum) in __elfw2() 647 if (shnum > 0) in __elfw2() [all …]
|
D | libelfP.h | 494 size_t shnum) internal_function; 496 size_t shnum) internal_function; 498 extern int __elf32_updatemmap (Elf *elf, int change_bo, size_t shnum) 500 extern int __elf64_updatemmap (Elf *elf, int change_bo, size_t shnum) 502 extern int __elf32_updatefile (Elf *elf, int change_bo, size_t shnum) 504 extern int __elf64_updatefile (Elf *elf, int change_bo, size_t 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/valgrind/VEX/unused/ |
D | linker.c | 420 Elf_Shdr* shdr, int shnum, in do_Elf_Rel_relocations() argument 426 Elf_Rel* rtab = (Elf_Rel*) (ehdrC + shdr[shnum].sh_offset); in do_Elf_Rel_relocations() 427 int nent = shdr[shnum].sh_size / sizeof(Elf_Rel); in do_Elf_Rel_relocations() 428 int target_shndx = shdr[shnum].sh_info; in do_Elf_Rel_relocations() 429 int symtab_shndx = shdr[shnum].sh_link; in do_Elf_Rel_relocations() 546 Elf_Shdr* shdr, int shnum, in do_Elf_Rela_relocations() argument 552 Elf_Rela* rtab = (Elf_Rela*) (ehdrC + shdr[shnum].sh_offset); in do_Elf_Rela_relocations() 553 int nent = shdr[shnum].sh_size / sizeof(Elf_Rela); in do_Elf_Rela_relocations() 554 int target_shndx = shdr[shnum].sh_info; in do_Elf_Rela_relocations() 555 int symtab_shndx = shdr[shnum].sh_link; in do_Elf_Rela_relocations() [all …]
|
/external/valgrind/VEX/switchback/ |
D | linker.c | 516 Elf_Shdr* shdr, int shnum, 522 Elf_Rel* rtab = (Elf_Rel*) (ehdrC + shdr[shnum].sh_offset); 523 int nent = shdr[shnum].sh_size / sizeof(Elf_Rel); 524 int target_shndx = shdr[shnum].sh_info; 525 int symtab_shndx = shdr[shnum].sh_link; 642 Elf_Shdr* shdr, int shnum, 648 Elf_Rela* rtab = (Elf_Rela*) (ehdrC + shdr[shnum].sh_offset); 649 int nent = shdr[shnum].sh_size / sizeof(Elf_Rela); 650 int target_shndx = shdr[shnum].sh_info; 651 int symtab_shndx = shdr[shnum].sh_link; [all …]
|
/external/elfutils/src/ |
D | strip.c | 586 size_t shnum; in handle_elf() local 587 if (unlikely (elf_getshdrnum (elf, &shnum) < 0)) in handle_elf() 594 if (shstrndx >= shnum) in handle_elf() 603 if ((shnum + 2) * sizeof (struct shdr_info) > MAX_STACK_ALLOC) in handle_elf() 604 shdr_info = (struct shdr_info *) xcalloc (shnum + 2, in handle_elf() 608 shdr_info = (struct shdr_info *) alloca ((shnum + 2) in handle_elf() 610 memset (shdr_info, '\0', (shnum + 2) * sizeof (struct shdr_info)); in handle_elf() 643 if (shdr_info[cnt].old_sh_link >= shnum) in handle_elf() 679 if (grpref[inner] < shnum) in handle_elf() 726 for (cnt = 1; cnt < shnum; ++cnt) in handle_elf() [all …]
|
D | elfcompress.c | 279 size_t shnum = 0; in process_file() local 316 for (size_t n = 0; n < shnum; n++) in process_file() 377 if (elf_getshdrnum (elf, &shnum) != 0) in process_file() 384 if (shnum == 0) in process_file() 390 sections = xcalloc (shnum / 8 + 1, sizeof (unsigned int)); in process_file() 446 if (ndx > shnum) in process_file() 449 ndx, shnum); in process_file() 532 scnstrents = xmalloc (shnum in process_file() 534 scnnames = xcalloc (shnum, sizeof (char *)); in process_file() 649 assert (ndx < shnum); in process_file()
|
D | unstrip.c | 372 symtab_count_leading_section_symbols (Elf *elf, Elf_Scn *scn, size_t shnum, in symtab_count_leading_section_symbols() argument 378 for (size_t i = 1; i < shnum; ++i) in symtab_count_leading_section_symbols() 402 return shnum; in symtab_count_leading_section_symbols() 588 Elf *elf, bool rel, Elf_Scn *symscn, size_t shnum) in add_new_section_symbols() argument 590 const size_t added = shnum - old_shnum; in add_new_section_symbols() 627 for (size_t i = old_shnum; i < shnum; ++i) in add_new_section_symbols() 668 size_t shnum, size_t shstrndx, in check_symtab_section_symbols() argument 676 return add_new_section_symbols (oscn, n, elf, rel, scn, shnum); in check_symtab_section_symbols() 1030 uint_fast16_t shnum; in find_alloc_sections_prelink() local 1034 shnum = ehdr.e32.e_shnum; in find_alloc_sections_prelink() [all …]
|
D | nm.c | 746 size_t shnum; in show_symbols_sysv() local 747 if (elf_getshdrnum (ebl->elf, &shnum) < 0) in show_symbols_sysv() 750 bool scnnames_malloced = shnum * sizeof (const char *) > 128 * 1024; in show_symbols_sysv() 753 scnnames = (const char **) xmalloc (sizeof (const char *) * shnum); in show_symbols_sysv() 755 scnnames = (const char **) alloca (sizeof (const char *) * shnum); in show_symbols_sysv() 870 shnum)); in show_symbols_sysv()
|
D | elflint.c | 127 static unsigned int shnum; variable 320 if ((unsigned int) idx > shnum) in section_name() 430 shnum = ehdr->e_shnum; in check_elf_header() 455 shnum = shdr->sh_size; in check_elf_header() 465 if (shdr != NULL && shdr->sh_link < shnum) in check_elf_header() 468 else if (shstrndx >= shnum) in check_elf_header() 510 else if (ehdr->e_shoff + shnum * ehdr->e_shentsize > size) in check_elf_header() 544 for (cnt = idx + 1; cnt < shnum; ++cnt) in check_scn_group() 572 if (cnt == shnum) in check_scn_group() 616 for (size_t cnt = 1; cnt < shnum; ++cnt) in check_symtab() [all …]
|
D | ldgeneric.c | 647 size_t shnum; in check_definition() local 649 if (elf_getshdrnum (fileinfo->elf, &shnum) < 0) in check_definition() 655 if (shndx < SHN_LORESERVE || (shndx > SHN_HIRESERVE && shndx < shnum)) in check_definition() 662 NULL, shnum); in check_definition() 686 buf, sizeof (buf), NULL, shnum); in check_definition() 1611 size_t shnum; in add_relocatable_file() local 1612 assert (elf_getshdrnum (fileinfo->elf, &shnum) == 0); in add_relocatable_file() 1613 assert (shndx < shnum); in add_relocatable_file()
|
D | readelf.c | 239 static size_t shnum; variable 850 if (unlikely (elf_getshdrnum (ebl->elf, &shnum) < 0)) in process_elf_file() 1140 for (cnt = 0; cnt < shnum; ++cnt) in print_shdr() 1342 for (size_t inner = 1; inner < shnum; ++inner) in print_phdr() 2361 sizeof (scnbuf), NULL, shnum), in handle_symtab() 9414 if (shnum != 0) in handle_notes()
|
/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 | 124 const char *scnnames[], size_t shnum);
|
/external/elfutils/libdwfl/ |
D | dwfl_module_getdwarf.c | 331 uint_fast16_t shnum; in find_prelink_address_sync() local 338 shnum = ehdr.e32.e_shnum; in find_prelink_address_sync() 346 shnum = ehdr.e64.e_shnum; in find_prelink_address_sync() 351 if (unlikely (shnum >= SHN_LORESERVE) in find_prelink_address_sync() 354 + (shnum - 1) * shentsize))) in find_prelink_address_sync() 433 src.d_size = gelf_fsize (mod->main.elf, ELF_T_SHDR, shnum - 1, EV_CURRENT); in find_prelink_address_sync() 436 if (unlikely (shnum - 1 > SIZE_MAX / shdr_size)) in find_prelink_address_sync() 438 const size_t shdrs_bytes = (shnum - 1) * shdr_size; in find_prelink_address_sync() 490 Elf32_Shdr (*s32)[shnum - 1] = shdrs; in find_prelink_address_sync() 491 for (size_t i = 0; i < shnum - 1; ++i) in find_prelink_address_sync() [all …]
|
/external/elfutils/po/ |
D | uk.po | 2806 "zeroth section has nonzero size value while ELF header has nonzero shnum " 2810 "ненульове значення shnum\n" 7081 msgid "overflow with shnum = %zu in '%s' section"
|
D | pl.po | 2775 "zeroth section has nonzero size value while ELF header has nonzero shnum " 2779 "niezerową wartość shnum\n" 7029 msgid "overflow with shnum = %zu in '%s' section" 7030 msgstr "przepełnienie z shnum = %zu w sekcji „%s”"
|
D | es.po | 2822 "zeroth section has nonzero size value while ELF header has nonzero shnum " 2826 "ELF tiene valor shnum nonzero\n" 7070 msgid "overflow with shnum = %zu in '%s' section"
|
D | ja.po | 2694 "zeroth section has nonzero size value while ELF header has nonzero shnum " 6762 msgid "overflow with shnum = %zu in '%s' section"
|
D | de.po | 2614 "zeroth section has nonzero size value while ELF header has nonzero shnum " 6489 msgid "overflow with shnum = %zu in '%s' section"
|
D | it.po | 2226 "zeroth section has nonzero size value while ELF header has nonzero shnum "
|
/external/valgrind/perf/ |
D | tinycc.c | 19217 int shnum, i, phnum, file_offset, offset, size, j, tmp, sh_order_index, k; in tcc_output_file() local 19412 shnum = s1->nb_sections; in tcc_output_file() 19415 section_order = tcc_malloc(sizeof(int) * shnum); in tcc_output_file() 19783 ehdr.e_shnum = shnum; in tcc_output_file() 19784 ehdr.e_shstrndx = shnum - 1; in tcc_output_file()
|