/dragonfly/stand/boot/common/ |
H A D | load_elf_obj.c | 196 Elf_Shdr *shdr; in __elfN() local 208 if (shdr == NULL) { in __elfN() 213 ef->e_shdr = shdr; in __elfN() 295 if (shdr[i].sh_addr == 0 || shdr[i].sh_type == SHT_NOBITS) in __elfN() 298 shdr[i].sh_size, (off_t)shdr[i].sh_offset) != 0) { in __elfN() 406 Elf_Shdr *shdr; in __elfN() local 423 *stopp = shdr[i].sh_addr + shdr[i].sh_size; in __elfN() 444 Elf_Shdr *shdr; in __elfN() local 455 if (shdr[i].sh_type != SHT_RELA && shdr[i].sh_type != SHT_REL) in __elfN() 457 base = shdr[shdr[i].sh_info].sh_addr; in __elfN() [all …]
|
H A D | load_elf.c | 266 Elf_Shdr *shdr; in __elfN() local 282 shdr = NULL; in __elfN() 372 if (shdr == NULL) { in __elfN() 386 (shdr[i].sh_offset + shdr[i].sh_size <= in __elfN() 388 shdr[i].sh_offset = 0; in __elfN() 389 shdr[i].sh_size = 0; in __elfN() 393 if (shdr[i].sh_offset == 0 || shdr[i].sh_size == 0) in __elfN() 424 size = shdr[i].sh_size; in __elfN() 430 (uintmax_t)shdr[i].sh_size, (uintmax_t)shdr[i].sh_offset, in __elfN() 543 if (shdr) in __elfN() [all …]
|
/dragonfly/sys/kern/ |
H A D | link_elf_obj.c | 219 ef->e_shdr = shdr; in link_elf_obj_preload_file() 271 if (shdr[i].sh_addr != 0 && (off == 0 || shdr[i].sh_addr < off)) in link_elf_obj_preload_file() 276 shdr[i].sh_addr = shdr[i].sh_addr - off + in link_elf_obj_preload_file() 425 shdr = NULL; in link_elf_obj_load_file() 504 ef->e_shdr = shdr; in link_elf_obj_load_file() 579 shdr[symtabindex].sh_size, shdr[symtabindex].sh_offset, in link_elf_obj_load_file() 593 shdr[symstrindex].sh_size, shdr[symstrindex].sh_offset, in link_elf_obj_load_file() 610 shdr[shstrindex].sh_size, shdr[shstrindex].sh_offset, in link_elf_obj_load_file() 736 shdr[i].sh_size, shdr[i].sh_offset, in link_elf_obj_load_file() 778 shdr[i].sh_size, shdr[i].sh_offset, in link_elf_obj_load_file() [all …]
|
H A D | link_elf.c | 411 Elf_Shdr *shdr; in link_elf_load_file() local 428 shdr = NULL; in link_elf_load_file() 595 (caddr_t)shdr, nbytes, hdr->e_shoff, in link_elf_load_file() 602 if (shdr[i].sh_type == SHT_SYMTAB) { in link_elf_load_file() 604 symstrindex = shdr[i].sh_link; in link_elf_load_file() 610 symcnt = shdr[symtabindex].sh_size; in link_elf_load_file() 612 strcnt = shdr[symstrindex].sh_size; in link_elf_load_file() 615 ef->symbase, symcnt, shdr[symtabindex].sh_offset, in link_elf_load_file() 620 ef->strbase, strcnt, shdr[symstrindex].sh_offset, in link_elf_load_file() 637 if (shdr) in link_elf_load_file() [all …]
|
/dragonfly/usr.bin/crunch/crunchide/ |
H A D | exec_elf64.c | 73 Elf_Shdr *shdr; member 300 layoutp[shnum].shdr = &shdrshdr; in ELFNAMEEND() 309 xewtoh(layoutp[m].shdr->sh_offset)) in ELFNAMEEND() 320 layoutp[r].shdr = &shdrp[i]; in ELFNAMEEND() 340 if (layoutp[i].shdr == &shdrshdr) { in ELFNAMEEND() 345 if (layoutp[i].shdr == shstrtabshdr) { in ELFNAMEEND() 351 if (layoutp[i].shdr == strtabshdr) in ELFNAMEEND() 365 if (layoutp[i].shdr == symtabshdr) in ELFNAMEEND() 435 if (layoutp[i].shdr == strtabshdr) { in ELFNAMEEND() 441 if (layoutp[i].shdr == &shdrshdr || in ELFNAMEEND() [all …]
|
/dragonfly/contrib/binutils-2.34/elfcpp/ |
H A D | elfcpp_file.h | 519 Ef_shdr shdr(v.data()); in section_name() 567 Ef_shdr shdr(v.data()); in section_contents() 568 return typename File::Location(shdr.get_sh_offset(), shdr.get_sh_size()); in section_contents() 586 Ef_shdr shdr(v.data()); in section_size() 587 return shdr.get_sh_size(); in section_size() 605 Ef_shdr shdr(v.data()); in section_flags() 624 Ef_shdr shdr(v.data()); in section_addr() 643 Ef_shdr shdr(v.data()); in section_type() 662 Ef_shdr shdr(v.data()); in section_link() 681 Ef_shdr shdr(v.data()); in section_info() [all …]
|
/dragonfly/contrib/binutils-2.27/elfcpp/ |
H A D | elfcpp_file.h | 519 Ef_shdr shdr(v.data()); in section_name() 567 Ef_shdr shdr(v.data()); in section_contents() 568 return typename File::Location(shdr.get_sh_offset(), shdr.get_sh_size()); in section_contents() 586 Ef_shdr shdr(v.data()); in section_size() 587 return shdr.get_sh_size(); in section_size() 605 Ef_shdr shdr(v.data()); in section_flags() 624 Ef_shdr shdr(v.data()); in section_addr() 643 Ef_shdr shdr(v.data()); in section_type() 662 Ef_shdr shdr(v.data()); in section_link() 681 Ef_shdr shdr(v.data()); in section_info() [all …]
|
/dragonfly/lib/libc/gen/ |
H A D | nlist.c | 239 Elf_Shdr *shdr = NULL; in __elf_fdnlist() local 267 shdr = (Elf_Shdr *)base; in __elf_fdnlist() 276 if (shdr[i].sh_type == SHT_SYMTAB) { in __elf_fdnlist() 277 symoff = shdr[i].sh_offset; in __elf_fdnlist() 278 symsize = shdr[i].sh_size; in __elf_fdnlist() 279 symstroff = shdr[shdr[i].sh_link].sh_offset; in __elf_fdnlist() 280 symstrsize = shdr[shdr[i].sh_link].sh_size; in __elf_fdnlist() 349 elf_sym_to_nlist(p_local, s, shdr, in __elf_fdnlist() 361 if (shdr != NULL) in __elf_fdnlist() 362 munmap(shdr, shdr_size); in __elf_fdnlist() [all …]
|
/dragonfly/contrib/binutils-2.27/gold/ |
H A D | object.cc | 527 typename This::Shdr shdr(p); in find_symtab() local 604 sh_name = shdr.get_sh_name(); in find_shdr() 660 typename This::Shdr shdr(s); in find_eh_frame() local 782 shdr.get_sh_flags())) in build_compressed_section_map() 1157 shdr, flags, &shndxes); in include_section_group() 1300 shdr, in layout_eh_frame_section() 1810 shdr, in do_layout() 1947 shdr, in do_layout_deferred_sections() 1959 shdr, deferred->reloc_shndx_, in do_layout_deferred_sections() 2584 return shdr.get_sh_flags(); in do_section_flags() [all …]
|
H A D | reloc.cc | 281 typename This::Shdr shdr(ps); in do_read_relocs() local 283 unsigned int sh_type = shdr.get_sh_type(); in do_read_relocs() 323 off_t sh_size = shdr.get_sh_size(); in do_read_relocs() 333 if (reloc_size != shdr.get_sh_entsize()) in do_read_relocs() 702 typename This::Shdr shdr(p); in write_sections() local 709 && (shdr.get_sh_type() == elfcpp::SHT_REL in write_sections() 800 off_t sh_offset = shdr.get_sh_offset(); in write_sections() 816 off_t sh_offset = shdr.get_sh_offset(); in write_sections() 832 shdr.get_sh_flags())) in write_sections() 889 typename This::Shdr shdr(p); in do_relocate_sections() local [all …]
|
H A D | layout.cc | 1094 shdr.get_sh_addralign(); in init_fixed_output_section() 1182 shdr.get_sh_flags(), true, in layout() 1241 && shdr.get_sh_size() > size / 8 in layout() 1294 int sh_type = shdr.get_sh_type(); in layout_reloc() 1311 shdr.get_sh_flags(), false, in layout_reloc() 1365 shdr.get_sh_flags(), in layout_group() 5716 elfcpp::Shdr<32, false>& shdr); 5724 elfcpp::Shdr<32, true>& shdr); 5732 elfcpp::Shdr<64, false>& shdr); 5740 elfcpp::Shdr<64, true>& shdr); [all …]
|
H A D | dynobj.cc | 123 typename This::Shdr shdr(p); in find_dynsym_sections() local 126 switch (shdr.get_sh_type()) in find_dynsym_sections() 157 xindex_link = this->adjust_shndx(shdr.get_sh_link()); in find_dynsym_sections() 177 shdr.get_sh_type(), *pi, i); in find_dynsym_sections() 228 gold_assert(shdr.get_sh_type() == type); in read_dynsym_section() 230 if (this->adjust_shndx(shdr.get_sh_link()) != link) in read_dynsym_section() 234 *view = this->get_lasting_view(shdr.get_sh_offset(), shdr.get_sh_size(), in read_dynsym_section() 237 *view_info = shdr.get_sh_info(); in read_dynsym_section() 494 typename This::Shdr shdr(pshdrs); in do_layout() local 496 if (shdr.get_sh_name() >= sd->section_names_size) in do_layout() [all …]
|
/dragonfly/contrib/binutils-2.34/libiberty/ |
H A D | simple-object-elf.c | 625 unsigned char *shdr; in simple_object_elf_find_sections() local 633 shdr, sh_name, Elf_Word); in simple_object_elf_find_sections() 646 shdr, sh_size, Elf_Addr); in simple_object_elf_find_sections() 1161 unsigned char *shdr; in simple_object_elf_copy_lto_debug_sections() local 1168 shdr, sh_name, Elf_Word); in simple_object_elf_copy_lto_debug_sections() 1188 shdr, sh_type, Elf_Word); in simple_object_elf_copy_lto_debug_sections() 1210 unsigned char *shdr; in simple_object_elf_copy_lto_debug_sections() local 1233 shdr, sh_size, Elf_Addr); in simple_object_elf_copy_lto_debug_sections() 1305 unsigned char *shdr; in simple_object_elf_copy_lto_debug_sections() local 1320 shdr, sh_name, Elf_Word); in simple_object_elf_copy_lto_debug_sections() [all …]
|
/dragonfly/contrib/gcc-8.0/libiberty/ |
H A D | simple-object-elf.c | 617 unsigned char *shdr; in simple_object_elf_find_sections() local 625 shdr, sh_name, Elf_Word); in simple_object_elf_find_sections() 638 shdr, sh_size, Elf_Addr); in simple_object_elf_find_sections() 1153 unsigned char *shdr; in simple_object_elf_copy_lto_debug_sections() local 1160 shdr, sh_name, Elf_Word); in simple_object_elf_copy_lto_debug_sections() 1180 shdr, sh_type, Elf_Word); in simple_object_elf_copy_lto_debug_sections() 1202 unsigned char *shdr; in simple_object_elf_copy_lto_debug_sections() local 1225 shdr, sh_size, Elf_Addr); in simple_object_elf_copy_lto_debug_sections() 1297 unsigned char *shdr; in simple_object_elf_copy_lto_debug_sections() local 1312 shdr, sh_name, Elf_Word); in simple_object_elf_copy_lto_debug_sections() [all …]
|
/dragonfly/contrib/binutils-2.34/gold/ |
H A D | object.cc | 526 typename This::Shdr shdr(p); in find_symtab() local 603 sh_name = shdr.get_sh_name(); in find_shdr() 659 typename This::Shdr shdr(s); in find_eh_frame() local 783 shdr.get_sh_flags())) in build_compressed_section_map() 1133 shdr, flags, &shndxes); in include_section_group() 1270 shdr, in layout_eh_frame_section() 1922 shdr, in do_layout() 2060 shdr, in do_layout_deferred_sections() 2072 shdr, shdr.get_sh_type(), deferred->reloc_shndx_, in do_layout_deferred_sections() 2711 return shdr.get_sh_flags(); in do_section_flags() [all …]
|
H A D | reloc.cc | 281 typename This::Shdr shdr(ps); in do_read_relocs() local 283 unsigned int sh_type = shdr.get_sh_type(); in do_read_relocs() 323 off_t sh_size = shdr.get_sh_size(); in do_read_relocs() 333 if (reloc_size != shdr.get_sh_entsize()) in do_read_relocs() 702 typename This::Shdr shdr(p); in write_sections() local 709 && (shdr.get_sh_type() == elfcpp::SHT_REL in write_sections() 800 off_t sh_offset = shdr.get_sh_offset(); in write_sections() 816 off_t sh_offset = shdr.get_sh_offset(); in write_sections() 832 shdr.get_sh_flags())) in write_sections() 912 typename This::Shdr shdr(p); in relocate_section_range() local [all …]
|
H A D | layout.cc | 1104 shdr.get_sh_addralign(); in init_fixed_output_section() 1215 shdr.get_sh_flags(), true, in layout() 1276 && shdr.get_sh_size() > size / 8 in layout() 1329 int sh_type = shdr.get_sh_type(); in layout_reloc() 1395 shdr.get_sh_flags(), in layout_group() 6167 elfcpp::Shdr<32, false>& shdr); 6175 elfcpp::Shdr<32, true>& shdr); 6183 elfcpp::Shdr<64, false>& shdr); 6191 elfcpp::Shdr<64, true>& shdr); 6210 const elfcpp::Shdr<32, true>& shdr, [all …]
|
H A D | dynobj.cc | 123 typename This::Shdr shdr(p); in find_dynsym_sections() local 126 switch (shdr.get_sh_type()) in find_dynsym_sections() 157 xindex_link = this->adjust_shndx(shdr.get_sh_link()); in find_dynsym_sections() 177 shdr.get_sh_type(), *pi, i); in find_dynsym_sections() 228 gold_assert(shdr.get_sh_type() == type); in read_dynsym_section() 230 if (this->adjust_shndx(shdr.get_sh_link()) != link) in read_dynsym_section() 234 *view = this->get_lasting_view(shdr.get_sh_offset(), shdr.get_sh_size(), in read_dynsym_section() 237 *view_info = shdr.get_sh_info(); in read_dynsym_section() 494 typename This::Shdr shdr(pshdrs); in do_layout() local 496 if (shdr.get_sh_name() >= sd->section_names_size) in do_layout() [all …]
|
/dragonfly/contrib/elftoolchain/libelf/ |
H A D | libelf_checksum.c | 53 GElf_Shdr shdr; in _libelf_checksum() local 81 if (gelf_getshdr(scn, &shdr) == NULL) in _libelf_checksum() 83 if ((shdr.sh_flags & SHF_ALLOC) == 0 || in _libelf_checksum() 84 shdr.sh_type == SHT_DYNAMIC || in _libelf_checksum() 85 shdr.sh_type == SHT_DYNSYM) in _libelf_checksum()
|
H A D | elf_strptr.c | 45 GElf_Shdr shdr; in elf_strptr() local 54 gelf_getshdr(s, &shdr) == NULL) in elf_strptr() 57 if (shdr.sh_type != SHT_STRTAB || in elf_strptr() 58 offset >= shdr.sh_size) { in elf_strptr()
|
/dragonfly/lib/libexecinfo/ |
H A D | symtab.c | 110 GElf_Shdr shdr; in symtab_create() local 115 if (gelf_getshdr(scn, &shdr) == NULL) in symtab_create() 117 if(shdr.sh_type != SHT_SYMTAB) in symtab_create() 121 ns = shdr.sh_size / shdr.sh_entsize; in symtab_create() 145 elf_strptr(elf, shdr.sh_link, sym.st_name)); in symtab_create()
|
/dragonfly/contrib/gcc-8.0/libbacktrace/ |
H A D | elf.c | 2755 const b_elf_shdr *shdr; in elf_add() local 2764 shnum = shdr->sh_size; in elf_add() 2768 shstrndx = shdr->sh_link; in elf_add() 2820 const b_elf_shdr *shdr; in elf_add() local 2825 shdr = &shdrs[i - 1]; in elf_add() 2827 if (shdr->sh_type == SHT_SYMTAB) in elf_add() 2832 sh_name = shdr->sh_name; in elf_add() 2895 if (crc_offset + 4 <= shdr->sh_size) in elf_add() 2905 && shdr->sh_type == SHT_PROGBITS in elf_add() 2914 opd->addr = shdr->sh_addr; in elf_add() [all …]
|
/dragonfly/contrib/binutils-2.27/libiberty/ |
H A D | simple-object-elf.c | 434 unsigned char shdr[sizeof (Elf64_External_Shdr)]; in simple_object_elf_match() local 438 if (!simple_object_internal_read (descriptor, offset + eor->shoff, shdr, in simple_object_elf_match() 450 shdr, sh_size, Elf_Addr); in simple_object_elf_match() 455 shdr, sh_link, Elf_Word); in simple_object_elf_match() 547 unsigned char *shdr; in simple_object_elf_find_sections() local 553 shdr = shdrs + (i - 1) * shdr_size; in simple_object_elf_find_sections() 555 shdr, sh_name, Elf_Word); in simple_object_elf_find_sections() 566 shdr, sh_offset, Elf_Addr); in simple_object_elf_find_sections() 568 shdr, sh_size, Elf_Addr); in simple_object_elf_find_sections()
|
/dragonfly/contrib/gdb-7/libiberty/ |
H A D | simple-object-elf.c | 434 unsigned char shdr[sizeof (Elf64_External_Shdr)]; in simple_object_elf_match() local 438 if (!simple_object_internal_read (descriptor, offset + eor->shoff, shdr, in simple_object_elf_match() 450 shdr, sh_size, Elf_Addr); in simple_object_elf_match() 455 shdr, sh_link, Elf_Word); in simple_object_elf_match() 547 unsigned char *shdr; in simple_object_elf_find_sections() local 553 shdr = shdrs + (i - 1) * shdr_size; in simple_object_elf_find_sections() 555 shdr, sh_name, Elf_Word); in simple_object_elf_find_sections() 566 shdr, sh_offset, Elf_Addr); in simple_object_elf_find_sections() 568 shdr, sh_size, Elf_Addr); in simple_object_elf_find_sections()
|
/dragonfly/contrib/gcc-4.7/libiberty/ |
H A D | simple-object-elf.c | 434 unsigned char shdr[sizeof (Elf64_External_Shdr)]; in simple_object_elf_match() local 438 if (!simple_object_internal_read (descriptor, offset + eor->shoff, shdr, in simple_object_elf_match() 450 shdr, sh_size, Elf_Addr); in simple_object_elf_match() 455 shdr, sh_link, Elf_Word); in simple_object_elf_match() 547 unsigned char *shdr; in simple_object_elf_find_sections() local 553 shdr = shdrs + (i - 1) * shdr_size; in simple_object_elf_find_sections() 555 shdr, sh_name, Elf_Word); in simple_object_elf_find_sections() 566 shdr, sh_offset, Elf_Addr); in simple_object_elf_find_sections() 568 shdr, sh_size, Elf_Addr); in simple_object_elf_find_sections()
|