Home
last modified time | relevance | path

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

123

/dragonfly/contrib/binutils-2.27/libiberty/
HDsimple-object-elf.c328 unsigned int shnum; member
426 eor->shnum = ELF_FETCH_FIELD (type_functions, ei_class, Ehdr, ehdr, in simple_object_elf_match()
431 if ((eor->shnum == 0 || eor->shstrndx == SHN_XINDEX) in simple_object_elf_match()
448 if (eor->shnum == 0) in simple_object_elf_match()
449 eor->shnum = ELF_FETCH_FIELD (type_functions, ei_class, Shdr, in simple_object_elf_match()
468 if (eor->shstrndx >= eor->shnum in simple_object_elf_match()
474 if (eor->shstrndx >= eor->shnum) in simple_object_elf_match()
499 unsigned int shnum; in simple_object_elf_find_sections() local
515 shnum = eor->shnum; in simple_object_elf_find_sections()
516 shdrs = XNEWVEC (unsigned char, shdr_size * (shnum - 1)); in simple_object_elf_find_sections()
[all …]
/dragonfly/contrib/gdb-7/libiberty/
HDsimple-object-elf.c328 unsigned int shnum; member
426 eor->shnum = ELF_FETCH_FIELD (type_functions, ei_class, Ehdr, ehdr, in simple_object_elf_match()
431 if ((eor->shnum == 0 || eor->shstrndx == SHN_XINDEX) in simple_object_elf_match()
448 if (eor->shnum == 0) in simple_object_elf_match()
449 eor->shnum = ELF_FETCH_FIELD (type_functions, ei_class, Shdr, in simple_object_elf_match()
468 if (eor->shstrndx >= eor->shnum in simple_object_elf_match()
474 if (eor->shstrndx >= eor->shnum) in simple_object_elf_match()
499 unsigned int shnum; in simple_object_elf_find_sections() local
515 shnum = eor->shnum; in simple_object_elf_find_sections()
516 shdrs = XNEWVEC (unsigned char, shdr_size * (shnum - 1)); in simple_object_elf_find_sections()
[all …]
/dragonfly/contrib/gcc-4.7/libiberty/
HDsimple-object-elf.c328 unsigned int shnum; member
426 eor->shnum = ELF_FETCH_FIELD (type_functions, ei_class, Ehdr, ehdr, in simple_object_elf_match()
431 if ((eor->shnum == 0 || eor->shstrndx == SHN_XINDEX) in simple_object_elf_match()
448 if (eor->shnum == 0) in simple_object_elf_match()
449 eor->shnum = ELF_FETCH_FIELD (type_functions, ei_class, Shdr, in simple_object_elf_match()
468 if (eor->shstrndx >= eor->shnum in simple_object_elf_match()
474 if (eor->shstrndx >= eor->shnum) in simple_object_elf_match()
499 unsigned int shnum; in simple_object_elf_find_sections() local
515 shnum = eor->shnum; in simple_object_elf_find_sections()
516 shdrs = XNEWVEC (unsigned char, shdr_size * (shnum - 1)); in simple_object_elf_find_sections()
[all …]
/dragonfly/contrib/binutils-2.34/libiberty/
HDsimple-object-elf.c390 unsigned int shnum; member
496 eor->shnum = ELF_FETCH_FIELD (type_functions, ei_class, Ehdr, ehdr, in simple_object_elf_match()
501 if ((eor->shnum == 0 || eor->shstrndx == SHN_XINDEX) in simple_object_elf_match()
518 if (eor->shnum == 0) in simple_object_elf_match()
519 eor->shnum = ELF_FETCH_FIELD (type_functions, ei_class, Shdr, in simple_object_elf_match()
538 if (eor->shstrndx >= eor->shnum in simple_object_elf_match()
544 if (eor->shstrndx >= eor->shnum) in simple_object_elf_match()
577 unsigned int shnum; in simple_object_elf_find_sections() local
593 shnum = eor->shnum; in simple_object_elf_find_sections()
594 shdrs = XNEWVEC (unsigned char, shdr_size * (shnum - 1)); in simple_object_elf_find_sections()
[all …]
/dragonfly/contrib/binutils-2.34/elfcpp/
HDelfcpp_file.h141 shnum() in shnum() function
148 shnum() const in shnum() function
482 unsigned int shnum = this->shnum(); in find_section_by_type() local
484 This::shdr_size * shnum)); in find_section_by_type()
485 for (unsigned int i = 0; i < shnum; i++) in find_section_by_type()
500 if (shndx >= this->shnum()) in section_header_offset()
502 shndx, this->shnum()); in section_header_offset()
561 if (shndx >= this->shnum()) in section_contents()
563 shndx, this->shnum()); in section_contents()
579 if (shndx >= this->shnum()) in section_size()
[all …]
/dragonfly/contrib/binutils-2.27/elfcpp/
HDelfcpp_file.h141 shnum() in shnum() function
148 shnum() const in shnum() function
482 unsigned int shnum = this->shnum(); in find_section_by_type() local
484 This::shdr_size * shnum)); in find_section_by_type()
485 for (unsigned int i = 0; i < shnum; i++) in find_section_by_type()
500 if (shndx >= this->shnum()) in section_header_offset()
502 shndx, this->shnum()); in section_header_offset()
561 if (shndx >= this->shnum()) in section_contents()
563 shndx, this->shnum()); in section_contents()
579 if (shndx >= this->shnum()) in section_size()
[all …]
/dragonfly/contrib/file/src/
HDelfclass.h55 shnum = elf_getu16(swap, elfhdr.e_shnum);
56 if (shnum > ms->elf_shnum_max)
57 return toomany(ms, "section", shnum);
61 fsize, shnum, &flags, &notecount) == -1)
65 shnum = elf_getu16(swap, elfhdr.e_shnum);
66 if (shnum > ms->elf_shnum_max)
67 return toomany(ms, "section headers", shnum);
69 CAST(off_t, elf_getu(swap, elfhdr.e_shoff)), shnum,
/dragonfly/contrib/gcc-8.0/libiberty/
HDsimple-object-elf.c390 unsigned int shnum; member
496 eor->shnum = ELF_FETCH_FIELD (type_functions, ei_class, Ehdr, ehdr, in simple_object_elf_match()
501 if ((eor->shnum == 0 || eor->shstrndx == SHN_XINDEX) in simple_object_elf_match()
518 if (eor->shnum == 0) in simple_object_elf_match()
519 eor->shnum = ELF_FETCH_FIELD (type_functions, ei_class, Shdr, in simple_object_elf_match()
538 if (eor->shstrndx >= eor->shnum in simple_object_elf_match()
544 if (eor->shstrndx >= eor->shnum) in simple_object_elf_match()
569 unsigned int shnum; in simple_object_elf_find_sections() local
585 shnum = eor->shnum; in simple_object_elf_find_sections()
586 shdrs = XNEWVEC (unsigned char, shdr_size * (shnum - 1)); in simple_object_elf_find_sections()
[all …]
/dragonfly/contrib/elftoolchain/libelf/
HDelf_shnum.c35 _libelf_getshdrnum(Elf *e, size_t *shnum) in _libelf_getshdrnum() argument
49 *shnum = e->e_u.e_elf.e_nscn; in _libelf_getshdrnum()
55 elf_getshdrnum(Elf *e, size_t *shnum) in elf_getshdrnum() argument
57 return (_libelf_getshdrnum(e, shnum)); in elf_getshdrnum()
62 elf_getshnum(Elf *e, size_t *shnum) in elf_getshnum() argument
64 return (_libelf_getshdrnum(e, shnum) >= 0); in elf_getshnum()
HDlibelf_extended.c49 _libelf_setshnum(Elf *e, void *eh, int ec, size_t shnum) in _libelf_setshnum() argument
53 if (shnum >= SHN_LORESERVE) { in _libelf_setshnum()
60 scn->s_shdr.s_shdr32.sh_size = shnum; in _libelf_setshnum()
62 scn->s_shdr.s_shdr64.sh_size = shnum; in _libelf_setshnum()
66 shnum = 0; in _libelf_setshnum()
70 ((Elf32_Ehdr *) eh)->e_shnum = shnum & 0xFFFFU; in _libelf_setshnum()
72 ((Elf64_Ehdr *) eh)->e_shnum = shnum & 0xFFFFU; in _libelf_setshnum()
HDlibelf_ehdr.c105 uint16_t phnum, shnum, strndx; in _libelf_ehdr() local
179 shnum = ((Elf32_Ehdr *) ehdr)->e_shnum; in _libelf_ehdr()
184 shnum = ((Elf64_Ehdr *) ehdr)->e_shnum; in _libelf_ehdr()
189 if (shnum >= SHN_LORESERVE || in _libelf_ehdr()
190 (shoff == 0LL && (shnum != 0 || phnum == PN_XNUM || in _libelf_ehdr()
196 if (shnum != 0 || shoff == 0LL) { /* not using extended numbering */ in _libelf_ehdr()
198 e->e_u.e_elf.e_nscn = shnum; in _libelf_ehdr()
HDelf_scn.c53 size_t fsz, i, shnum; in _libelf_load_section_headers() local
64 shnum > SIZE_MAX / fsz || \ in _libelf_load_section_headers()
65 fsz * shnum > e->e_rawsize - shoff) { \ in _libelf_load_section_headers()
75 shnum = e->e_u.e_elf.e_nscn; in _libelf_load_section_headers()
106 for (; i < shnum; i++, src += fsz) { in _libelf_load_section_headers()
/dragonfly/usr.bin/crunch/crunchide/
HDexec_elf64.c237 Elf_Half shnum; in ELFNAMEEND() local
244 shnum = xe16toh(ehdr.e_shnum); in ELFNAMEEND()
246 shdrsize = shnum * xe16toh(ehdr.e_shentsize); in ELFNAMEEND()
255 for (i = 0; i < shnum; i++) { in ELFNAMEEND()
291 layoutp = xmalloc((shnum + 1) * sizeof(struct shlayout), in ELFNAMEEND()
300 layoutp[shnum].shdr = &shdrshdr; in ELFNAMEEND()
303 for (i = shnum; i-- != 0;) { in ELFNAMEEND()
305 r = shnum; in ELFNAMEEND()
323 ++shnum; in ELFNAMEEND()
339 for (i = 0; i < shnum; i++) { in ELFNAMEEND()
[all …]
/dragonfly/contrib/binutils-2.27/gold/
HDobject.cc89 unsigned int i = object->shnum(); in initialize_symtab_xindex()
150 if (shndx < elfcpp::SHN_LORESERVE || shndx >= object->shnum()) in sym_xindex_to_shndx()
197 const unsigned int shnum = this->shnum(); in read_section_data() local
198 sd->section_headers = this->get_lasting_view(shoff, shnum * shdr_size, in read_section_data()
500 const unsigned int shnum = this->elf_file_.shnum(); in do_setup() local
501 this->set_shnum(shnum); in do_setup()
513 const unsigned int shnum = this->shnum(); in find_symtab() local
515 if (shnum > 0) in find_symtab()
519 const unsigned char* p = pshdrs + shnum * This::shdr_size; in find_symtab()
520 unsigned int i = shnum; in find_symtab()
[all …]
HDreloc.cc265 unsigned int shnum = this->shnum(); in do_read_relocs() local
266 if (shnum == 0) in do_read_relocs()
269 rd->relocs.reserve(shnum / 2); in do_read_relocs()
275 shnum * This::shdr_size, in do_read_relocs()
279 for (unsigned int i = 1; i < shnum; ++i, ps += This::shdr_size) in do_read_relocs()
288 if (shndx >= shnum) in do_read_relocs()
591 unsigned int shnum = this->shnum(); in do_relocate() local
595 shnum * This::shdr_size, in do_relocate()
599 views.resize(shnum); in do_relocate()
638 for (unsigned int i = 1; i < shnum; ++i) in do_relocate()
[all …]
HDdwp.cc160 shnum() const in shnum() function in gold::Dwo_file
161 { return this->obj_->shnum(); } in shnum()
778 const unsigned int shnum = this->elf_file_.shnum(); in setup() local
780 this->set_shnum(shnum); in setup()
781 this->section_offsets().resize(shnum); in setup()
784 const unsigned char* const pshdrs = this->get_view(shoff, shnum * shdr_size, in setup()
803 pshdrs, this->shnum(), names, section_names_size, this, true); in setup()
845 unsigned int shnum = this->shnum(); in read_executable() local
846 this->is_compressed_.resize(shnum); in read_executable()
847 this->sect_offsets_.resize(shnum); in read_executable()
[all …]
HDnacl.h199 const unsigned int shnum = elf_file.shnum(); in do_recognize_nacl_file() local
200 for (unsigned int shndx = 1; shndx < shnum; ++shndx) in do_recognize_nacl_file()
HDdynobj.cc95 const unsigned int shnum = this->elf_file_.shnum(); in setup() local
96 this->set_shnum(shnum); in setup()
119 const unsigned int shnum = this->shnum(); in find_dynsym_sections() local
121 for (unsigned int i = 0; i < shnum; ++i, p += This::shdr_size) in find_dynsym_sections()
265 if (link >= this->shnum()) in read_dynamic()
383 pshdrs, this->shnum(), names, sd->section_names_size, this, true); in base_read_symbols()
402 if (strtab_shndx >= this->shnum()) in base_read_symbols()
479 const unsigned int shnum = this->shnum(); in do_layout() local
480 if (shnum == 0) in do_layout()
492 for (unsigned int i = 1; i < shnum; ++i, pshdrs += This::shdr_size) in do_layout()
HDmapfile.cc361 unsigned int shnum = relobj->shnum(); in print_discarded_sections() local
362 for (unsigned int i = 0; i < shnum; ++i) in print_discarded_sections()
/dragonfly/contrib/binutils-2.34/gold/
HDobject.cc89 unsigned int i = object->shnum(); in initialize_symtab_xindex()
150 if (shndx < elfcpp::SHN_LORESERVE || shndx >= object->shnum()) in sym_xindex_to_shndx()
197 const unsigned int shnum = this->shnum(); in read_section_data() local
198 sd->section_headers = this->get_lasting_view(shoff, shnum * shdr_size, in read_section_data()
499 const unsigned int shnum = this->elf_file_.shnum(); in do_setup() local
500 this->set_shnum(shnum); in do_setup()
512 const unsigned int shnum = this->shnum(); in find_symtab() local
514 if (shnum > 0) in find_symtab()
518 const unsigned char* p = pshdrs + shnum * This::shdr_size; in find_symtab()
519 unsigned int i = shnum; in find_symtab()
[all …]
HDreloc.cc265 unsigned int shnum = this->shnum(); in do_read_relocs() local
266 if (shnum == 0) in do_read_relocs()
269 rd->relocs.reserve(shnum / 2); in do_read_relocs()
275 shnum * This::shdr_size, in do_read_relocs()
279 for (unsigned int i = 1; i < shnum; ++i, ps += This::shdr_size) in do_read_relocs()
288 if (shndx >= shnum) in do_read_relocs()
591 unsigned int shnum = this->shnum(); in do_relocate() local
595 shnum * This::shdr_size, in do_relocate()
599 views.resize(shnum); in do_relocate()
638 for (unsigned int i = 1; i < shnum; ++i) in do_relocate()
[all …]
HDnacl.h199 const unsigned int shnum = elf_file.shnum(); in do_recognize_nacl_file() local
200 for (unsigned int shndx = 1; shndx < shnum; ++shndx) in do_recognize_nacl_file()
HDdynobj.cc95 const unsigned int shnum = this->elf_file_.shnum(); in setup() local
96 this->set_shnum(shnum); in setup()
119 const unsigned int shnum = this->shnum(); in find_dynsym_sections() local
121 for (unsigned int i = 0; i < shnum; ++i, p += This::shdr_size) in find_dynsym_sections()
265 if (link >= this->shnum()) in read_dynamic()
383 pshdrs, this->shnum(), names, sd->section_names_size, this, true); in base_read_symbols()
402 if (strtab_shndx >= this->shnum()) in base_read_symbols()
479 const unsigned int shnum = this->shnum(); in do_layout() local
480 if (shnum == 0) in do_layout()
492 for (unsigned int i = 1; i < shnum; ++i, pshdrs += This::shdr_size) in do_layout()
HDmapfile.cc361 unsigned int shnum = relobj->shnum(); in print_discarded_sections() local
362 for (unsigned int i = 0; i < shnum; ++i) in print_discarded_sections()
HDincremental.cc230 || strtab_shndx > this->elf_file_.shnum() in find_incremental_inputs_sections()
299 && main_strtab_shndx < this->elf_file_.shnum()); in setup_readers()
534 const unsigned int shnum = this->elf_file_.shnum(); in do_init_layout() local
536 Location shdrs_location(shoff, shnum * shdr_size); in do_init_layout()
546 this->section_map_.resize(shnum); in do_init_layout()
548 for (unsigned int i = 1; i < shnum; i++) in do_init_layout()
613 unsigned int shnum = input_file.get_input_section_count(); in do_reserve_layout() local
614 for (unsigned int i = 0; i < shnum; i++) in do_reserve_layout()
1586 unsigned int* index_map = new unsigned int[obj->shnum()]; in write_info_blocks()
1587 memset(index_map, 0, obj->shnum() * sizeof(unsigned int)); in write_info_blocks()
[all …]

123