| /freebsd-11-stable/contrib/elftoolchain/libelf/ |
| HD | elf_data.c | 45 uint64_t sh_align, sh_offset, sh_size, raw_size; in elf_getdata() local 80 sh_offset = (uint64_t) s->s_shdr.s_shdr32.sh_offset; in elf_getdata() 85 sh_offset = s->s_shdr.s_shdr64.sh_offset; in elf_getdata() 98 (sh_offset > raw_size || sh_size > raw_size - sh_offset))) { in elf_getdata() 159 e->e_rawfile + sh_offset, count, in elf_getdata() 221 uint64_t sh_align, sh_offset, sh_size, raw_size; in elf_rawdata() local 244 sh_offset = (uint64_t) s->s_shdr.s_shdr32.sh_offset; in elf_rawdata() 249 sh_offset = s->s_shdr.s_shdr64.sh_offset; in elf_rawdata() 261 (sh_offset > raw_size || sh_size > raw_size - sh_offset)) { in elf_rawdata() 270 e->e_rawfile + sh_offset; in elf_rawdata()
|
| HD | gelf_shdr.c | 75 d->sh_offset = (Elf64_Off) sh32->sh_offset; in gelf_getshdr() 122 LIBELF_COPY_U32(sh32, s, sh_offset); in gelf_update_shdr()
|
| HD | elf_update.c | 122 uint64_t sh_align, sh_entsize, sh_offset, sh_size; in _libelf_compute_section_extents() local 132 sh_offset = (uint64_t) shdr32->sh_offset; in _libelf_compute_section_extents() 138 sh_offset = shdr64->sh_offset; in _libelf_compute_section_extents() 281 sh_offset % sh_align || in _libelf_compute_section_extents() 283 sh_offset % _libelf_falign(elftype, ec)) { in _libelf_compute_section_extents() 317 sh_offset = roundup((uint64_t) rc, sh_align); in _libelf_compute_section_extents() 325 shdr32->sh_offset = (uint32_t) sh_offset; in _libelf_compute_section_extents() 330 shdr64->sh_offset = sh_offset; in _libelf_compute_section_extents() 339 s->s_offset = sh_offset; in _libelf_compute_section_extents()
|
| HD | elf_scn.c | 129 scn->s_shdr.s_shdr32.sh_offset; in _libelf_load_section_headers() 133 scn->s_shdr.s_shdr64.sh_offset; in _libelf_load_section_headers()
|
| /freebsd-11-stable/usr.sbin/crunch/crunchide/ |
| HD | exec_elf32.c | 304 shdrshdr.sh_offset = ehdr.e_shoff; in ELFNAMEEND() 315 if (xewtoh(shdrp[i].sh_offset) > in ELFNAMEEND() 316 xewtoh(layoutp[m].shdr->sh_offset)) in ELFNAMEEND() 341 if ((size_t)xreadatoff(fd, shstrtabp, xewtoh(shstrtabshdr->sh_offset), in ELFNAMEEND() 364 off = xewtoh(layoutp[i].shdr->sh_offset); in ELFNAMEEND() 438 off = xewtoh(layoutp[i - 1].shdr->sh_offset) + in ELFNAMEEND() 442 layoutp[i].shdr->sh_offset = htoxew(off); in ELFNAMEEND() 465 ehdr.e_shoff != shdrshdr.sh_offset) { in ELFNAMEEND() 466 ehdr.e_shoff = shdrshdr.sh_offset; in ELFNAMEEND() 474 off = xewtoh(layoutp[i].shdr->sh_offset); in ELFNAMEEND()
|
| /freebsd-11-stable/cddl/contrib/opensolaris/lib/libctf/common/ |
| HD | ctf_lib.c | 169 dst->sh_offset = src->sh_offset; in shdr_to_gelf() 368 (sp[shstrndx].sh_offset & ~_PAGEMASK); in ctf_fdopen() 371 fd, sp[shstrndx].sh_offset & _PAGEMASK); in ctf_fdopen() 374 (sp[shstrndx].sh_offset & ~_PAGEMASK); in ctf_fdopen() 403 ctfsect.cts_offset = (off64_t)shp->sh_offset; in ctf_fdopen() 411 symsect.cts_offset = (off64_t)shp->sh_offset; in ctf_fdopen() 418 strsect.cts_offset = (off64_t)lhp->sh_offset; in ctf_fdopen()
|
| /freebsd-11-stable/cddl/contrib/opensolaris/lib/libdtrace/common/ |
| HD | dt_link.c | 75 (lseek64(fd, (off64_t)elf_file.shdr[(index)].sh_offset, SEEK_SET) != \ 76 (off64_t)elf_file.shdr[(index)].sh_offset || \ 556 shp->sh_offset = off; in dump_elf32() 559 off = P2ROUNDUP(shp->sh_offset + shp->sh_size, 8); in dump_elf32() 565 shp->sh_offset = off; in dump_elf32() 568 off = shp->sh_offset + shp->sh_size; in dump_elf32() 574 shp->sh_offset = off; in dump_elf32() 577 off = P2ROUNDUP(shp->sh_offset + shp->sh_size, 4); in dump_elf32() 585 shp->sh_offset = off; in dump_elf32() 589 off = P2ROUNDUP(shp->sh_offset + shp->sh_size, 4); in dump_elf32() [all …]
|
| /freebsd-11-stable/contrib/llvm-project/llvm/lib/ObjectYAML/ |
| HD | ELFEmitter.cpp | 365 To.sh_offset = *From->ShOffset; in overrideFields() 375 if (Header.sh_offset) in initImplicitHeader() 472 CBA.getOSAndAlignedOffset(SHeader.sh_offset, SHeader.sh_addralign); in initSectionHeaders() 630 auto &OS = CBA.getOSAndAlignedOffset(SHeader.sh_offset, SHeader.sh_addralign); in initSymtabSectionHeader() 656 auto &OS = CBA.getOSAndAlignedOffset(SHeader.sh_offset, SHeader.sh_addralign); in initStrtabSectionHeader() 700 Ret.push_back({H.sh_offset, H.sh_size, H.sh_type, H.sh_addralign}); in getPhdrFragments() 774 CBA.getOSAndAlignedOffset(SHeader.sh_offset, SHeader.sh_addralign); in writeSectionContent() 810 auto &OS = CBA.getOSAndAlignedOffset(SHeader.sh_offset, SHeader.sh_addralign); in writeSectionContent() 837 CBA.getOSAndAlignedOffset(SHeader.sh_offset, SHeader.sh_addralign); in writeSectionContent() 864 CBA.getOSAndAlignedOffset(SHeader.sh_offset, SHeader.sh_addralign); in writeSectionContent() [all …]
|
| /freebsd-11-stable/contrib/binutils/include/elf/ |
| HD | internal.h | 87 file_ptr sh_offset; /* Section file offset */ member 280 || ((bfd_vma) sec_hdr->sh_offset >= segment->p_offset \ 281 && (sec_hdr->sh_offset + ELF_SECTION_SIZE(sec_hdr, segment) \
|
| HD | external.h | 105 unsigned char sh_offset[4]; /* Section file offset */ member 118 unsigned char sh_offset[8]; /* Section file offset */ member
|
| /freebsd-11-stable/sys/x86/xen/ |
| HD | pv.c | 346 if (shdr[i].sh_offset == 0) in xen_pv_parse_symtab() 348 ksymtab = (uintptr_t)((uint8_t *)ehdr + shdr[i].sh_offset); in xen_pv_parse_symtab() 351 if (shdr[j].sh_offset == 0) in xen_pv_parse_symtab() 353 kstrtab = (uintptr_t)((uint8_t *)ehdr + shdr[j].sh_offset); in xen_pv_parse_symtab()
|
| /freebsd-11-stable/sys/mips/mips/ |
| HD | elf_trampoline.c | 141 if (shdr[i].sh_offset != 0 && in load_kernel() 187 shdr[symtabindex].sh_offset + kstart, in load_kernel() 198 shdr[symstrindex].sh_offset + kstart, in load_kernel()
|
| /freebsd-11-stable/sys/dev/ksyms/ |
| HD | ksyms.c | 318 hdr->kh_shdr[SHDR_SYMTAB].sh_offset = sizeof(*hdr); in ksyms_snapshot() 330 hdr->kh_shdr[SHDR_STRTAB].sh_offset = in ksyms_snapshot() 331 hdr->kh_shdr[SHDR_SYMTAB].sh_offset + ts->ts_symsz; in ksyms_snapshot() 344 hdr->kh_shdr[SHDR_SHSTRTAB].sh_offset = in ksyms_snapshot() 356 to.to_symoff = hdr->kh_shdr[SHDR_SYMTAB].sh_offset; in ksyms_snapshot() 357 to.to_stroff = hdr->kh_shdr[SHDR_STRTAB].sh_offset; in ksyms_snapshot()
|
| /freebsd-11-stable/stand/common/ |
| HD | load_elf.c | 184 CONVERT_FIELD(b, sh_offset, e); \ in elf_section_header_convert() 619 shstr = alloc_pread(ef->fd, shdr[ehdr->e_shstrndx].sh_offset, in __elfN() 649 if (shdr[i].sh_offset >= phdr[j].p_offset && in __elfN() 650 (shdr[i].sh_offset + shdr[i].sh_size <= in __elfN() 652 shdr[i].sh_offset = 0; in __elfN() 657 if (shdr[i].sh_offset == 0 || shdr[i].sh_size == 0) in __elfN() 701 (uintmax_t)shdr[i].sh_size, (uintmax_t)shdr[i].sh_offset, in __elfN() 710 if (lseek(ef->fd, (off_t)shdr[i].sh_offset, SEEK_SET) == -1) { in __elfN() 934 shstrtab = alloc_pread(ef.fd, shdr[ef.ehdr->e_shstrndx].sh_offset, in __elfN() 963 err = kern_pread(ef.fd, dest, sh_meta->sh_size, sh_meta->sh_offset); in __elfN() [all …]
|
| HD | load_elf_obj.c | 313 lshdr->sh_offset >= shdr[i].sh_offset) in __elfN() 317 cshdr->sh_offset > shdr[i].sh_offset) in __elfN() 325 cshdr->sh_size, (off_t)cshdr->sh_offset) != 0) { in __elfN()
|
| /freebsd-11-stable/sys/compat/linux/ |
| HD | linux_vdso.c | 205 sym = (Elf_Sym *)((caddr_t)ehdr + shdr[i].sh_offset); in __elfN() 232 shdr[__elfN(symstrindex)].sh_offset); in __elfN() 234 shdr[__elfN(symtabindex)].sh_offset); in __elfN()
|
| /freebsd-11-stable/sys/arm/arm/ |
| HD | elf_trampoline.c | 533 shdr[i].sh_offset >= in load_kernel() 535 (shdr[i].sh_offset + in load_kernel() 539 shdr[i].sh_offset = 0; in load_kernel() 544 if (shdr[i].sh_offset != 0 && in load_kernel() 556 shdr[symtabindex].sh_offset + kstart), in load_kernel() 560 (void *)(shdr[symstrindex].sh_offset + in load_kernel()
|
| /freebsd-11-stable/usr.bin/gprof/ |
| HD | elf.c | 98 symtab = (const Elf_Sym *)(base + sh_symtab->sh_offset); in elf_getnfile() 100 strtab = (const char *)(base + sh_strtab->sh_offset); in elf_getnfile()
|
| /freebsd-11-stable/contrib/binutils/binutils/ |
| HD | readelf.c | 3522 dynamic_addr = sec->sh_offset; in process_program_headers() 3655 internal->sh_offset = BYTE_GET (shdrs[i].sh_offset); in get_32bit_section_headers() 3700 internal->sh_offset = BYTE_GET (shdrs[i].sh_offset); in get_64bit_section_headers() 3719 esyms = get_data (NULL, file, section->sh_offset, 1, section->sh_size, in get_32bit_elf_symbols() 3729 shndx = get_data (NULL, file, symtab_shndx_hdr->sh_offset, in get_32bit_elf_symbols() 3782 esyms = get_data (NULL, file, section->sh_offset, 1, section->sh_size, in get_64bit_elf_symbols() 3792 shndx = get_data (NULL, file, symtab_shndx_hdr->sh_offset, in get_64bit_elf_symbols() 4045 string_table = get_data (NULL, file, section->sh_offset, in process_section_headers() 4139 dynamic_strings = get_data (NULL, file, section->sh_offset, in process_section_headers() 4262 (unsigned long) section->sh_offset, in process_section_headers() [all …]
|
| /freebsd-11-stable/usr.sbin/kldxref/ |
| HD | ef_obj.c | 465 if (ef_obj_read_entry(ef, shdr[symtabindex].sh_offset, in ef_obj_open() 472 if (ef_obj_read_entry(ef, shdr[symstrindex].sh_offset, in ef_obj_open() 484 if (ef_obj_read_entry(ef, shdr[shstrindex].sh_offset, in ef_obj_open() 535 if (ef_obj_read(ef, shdr[i].sh_offset, in ef_obj_open() 564 if (ef_obj_read_entry(ef, shdr[i].sh_offset, in ef_obj_open() 576 if (ef_obj_read_entry(ef, shdr[i].sh_offset, in ef_obj_open()
|
| /freebsd-11-stable/sys/kern/ |
| HD | kern_ctf.c | 171 shdr[hdr->e_shstrndx].sh_size, shdr[hdr->e_shstrndx].sh_offset, in link_elf_ctf_get() 190 shdr[i].sh_offset, UIO_SYSSPACE, IO_NODELOCKED, td->td_ucred, in link_elf_ctf_get() 249 shdr[i].sh_size, shdr[i].sh_offset, UIO_SYSSPACE, IO_NODELOCKED, in link_elf_ctf_get()
|
| /freebsd-11-stable/contrib/binutils/bfd/ |
| HD | elfcode.h | 306 dst->sh_offset = H_GET_WORD (abfd, src->sh_offset); in elf_swap_shdr_in() 329 H_PUT_WORD (abfd, src->sh_offset, dst->sh_offset); in elf_swap_shdr_out() 791 && (((i_shdrp[shindex].sh_addr - i_shdrp[shindex].sh_offset) in elf_object_p() 1188 if (bfd_seek (abfd, verhdr->sh_offset, SEEK_SET) != 0) in elf_slurp_symbol_table() 1368 if (bfd_seek (abfd, rel_hdr->sh_offset, SEEK_SET) != 0 in elf_slurp_reloc_table_from_section() 1474 BFD_ASSERT (asect->rel_filepos == rel_hdr->sh_offset in elf_slurp_reloc_table() 1475 || (rel_hdr2 && asect->rel_filepos == rel_hdr2->sh_offset)); in elf_slurp_reloc_table() 1530 (long) hdr->sh_offset, in elf_debug_section()
|
| /freebsd-11-stable/contrib/elftoolchain/elfcopy/ |
| HD | binary.c | 81 if (baseoff == -1 || (off_t) sh.sh_offset < baseoff) { in create_binary() 82 baseoff = sh.sh_offset; in create_binary()
|
| /freebsd-11-stable/contrib/llvm-project/llvm/include/llvm/Object/ |
| HD | ELF.h | 239 if (Shdr.sh_offset + Shdr.sh_size > getBufSize()) { in notes_begin() 242 Twine::utohexstr(Shdr.sh_offset) + ") or size (0x" + in notes_begin() 246 return Elf_Note_Iterator(base() + Shdr.sh_offset, Shdr.sh_size, Err); in notes_begin() 397 uintX_t Offset = Sec->sh_offset; in getSectionContentsAsArray() 576 size_t Pos = Section->sh_offset + Entry * sizeof(T); in getEntry()
|
| /freebsd-11-stable/contrib/file/src/ |
| HD | readelf.h | 211 Elf32_Off sh_offset; member 224 Elf64_Off sh_offset; member
|