/freebsd/contrib/elftoolchain/libelf/ |
H A D | 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()
|
H A D | 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()
|
H A D | 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()
|
H A D | 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()
|
H A D | elf_types.m4 | 200 `sh_offset, OFF', 213 `sh_offset, OFF',
|
/freebsd/usr.sbin/crunch/crunchide/ |
H A D | exec_elf32.c | 303 shdrshdr.sh_offset = ehdr.e_shoff; in ELFNAMEEND() 314 if (xewtoh(shdrp[i].sh_offset) > in ELFNAMEEND() 315 xewtoh(layoutp[m].shdr->sh_offset)) in ELFNAMEEND() 340 if ((size_t)xreadatoff(fd, shstrtabp, xewtoh(shstrtabshdr->sh_offset), in ELFNAMEEND() 363 off = xewtoh(layoutp[i].shdr->sh_offset); in ELFNAMEEND() 437 soff = xewtoh(layoutp[i - 1].shdr->sh_offset) + in ELFNAMEEND() 441 layoutp[i].shdr->sh_offset = htoxew(soff); in ELFNAMEEND() 464 ehdr.e_shoff != shdrshdr.sh_offset) { in ELFNAMEEND() 465 ehdr.e_shoff = shdrshdr.sh_offset; in ELFNAMEEND() 473 off = xewtoh(layoutp[i].shdr->sh_offset); in ELFNAMEEND()
|
/freebsd/cddl/contrib/opensolaris/lib/libctf/common/ |
H A D | ctf_lib.c | 170 dst->sh_offset = src->sh_offset; in shdr_to_gelf() 370 (sp[shstrndx].sh_offset & ~_PAGEMASK); in ctf_fdopen() 373 fd, sp[shstrndx].sh_offset & _PAGEMASK); in ctf_fdopen() 376 (sp[shstrndx].sh_offset & ~_PAGEMASK); in ctf_fdopen() 405 ctfsect.cts_offset = (off64_t)shp->sh_offset; in ctf_fdopen() 413 symsect.cts_offset = (off64_t)shp->sh_offset; in ctf_fdopen() 420 strsect.cts_offset = (off64_t)lhp->sh_offset; in ctf_fdopen()
|
/freebsd/cddl/contrib/opensolaris/lib/libdtrace/common/ |
H A D | dt_link.c | 61 (lseek64(fd, (off64_t)elf_file.shdr[(index)].sh_offset, SEEK_SET) != \ 62 (off64_t)elf_file.shdr[(index)].sh_offset || \ 538 shp->sh_offset = off; in dump_elf32() 541 off = roundup2(shp->sh_offset + shp->sh_size, 8); in dump_elf32() 547 shp->sh_offset = off; in dump_elf32() 550 off = shp->sh_offset + shp->sh_size; in dump_elf32() 556 shp->sh_offset = off; in dump_elf32() 559 off = roundup2(shp->sh_offset + shp->sh_size, 4); in dump_elf32() 567 shp->sh_offset = off; in dump_elf32() 571 off = roundup2(shp->sh_offset + shp->sh_size, 4); in dump_elf32() [all …]
|
/freebsd/sys/x86/xen/ |
H A D | pv.c | 237 if (shdr[i].sh_offset == 0) in xen_pvh_parse_symtab() 239 ksymtab = (uintptr_t)((uint8_t *)ehdr + shdr[i].sh_offset); in xen_pvh_parse_symtab() 242 if (shdr[j].sh_offset == 0) in xen_pvh_parse_symtab() 244 kstrtab = (uintptr_t)((uint8_t *)ehdr + shdr[j].sh_offset); in xen_pvh_parse_symtab()
|
/freebsd/lib/libkldelf/ |
H A D | ef.c | 261 if (shdr[i].sh_offset != phdyn->p_offset || in ef_parse_dynamic() 376 if (shdr[i].sh_offset != hash_off) { in ef_parse_dynamic() 392 shdr[i].sh_offset, shdr[i].sh_size, in ef_parse_dynamic() 411 if (shdr[i].sh_offset != sym_off) { in ef_parse_dynamic() 426 if (shdr[i].sh_offset != str_off) in ef_parse_dynamic() 437 if (shdr[i].sh_offset != rel_off) in ef_parse_dynamic() 454 if (shdr[i].sh_offset != rela_off) in ef_parse_dynamic()
|
/freebsd/sys/dev/ksyms/ |
H A D | ksyms.c | 328 hdr->kh_shdr[SHDR_SYMTAB].sh_offset = sizeof(*hdr); in ksyms_snapshot() 340 hdr->kh_shdr[SHDR_STRTAB].sh_offset = in ksyms_snapshot() 341 hdr->kh_shdr[SHDR_SYMTAB].sh_offset + ts->ts_symsz; in ksyms_snapshot() 354 hdr->kh_shdr[SHDR_SHSTRTAB].sh_offset = in ksyms_snapshot() 366 to.to_symoff = hdr->kh_shdr[SHDR_SYMTAB].sh_offset; in ksyms_snapshot() 367 to.to_stroff = hdr->kh_shdr[SHDR_STRTAB].sh_offset; in ksyms_snapshot()
|
/freebsd/usr.bin/gprof/ |
H A D | elf.c | 94 symtab = (const Elf_Sym *)(base + sh_symtab->sh_offset); in elf_getnfile() 96 strtab = (const char *)(base + sh_strtab->sh_offset); in elf_getnfile()
|
/freebsd/stand/common/ |
H A D | load_elf.c | 190 CONVERT_FIELD(b, sh_offset, e); \ in elf_section_header_convert() 731 shdr[ehdr->e_shstrndx].sh_offset, chunk); 760 if (shdr[i].sh_offset >= phdr[j].p_offset && 761 (shdr[i].sh_offset + shdr[i].sh_size <= 763 shdr[i].sh_offset = 0; 768 if (shdr[i].sh_offset == 0 || shdr[i].sh_size == 0) 802 (uintmax_t)shdr[i].sh_size, (uintmax_t)shdr[i].sh_offset, 810 if (VECTX_LSEEK(VECTX_HANDLE(ef), (off_t)shdr[i].sh_offset, SEEK_SET) == -1) { 1023 shstrtab = alloc_pread(VECTX_HANDLE(&ef), shdr[ef.ehdr->e_shstrndx].sh_offset, 1052 err = kern_pread(VECTX_HANDLE(&ef), dest, sh_meta->sh_size, sh_meta->sh_offset); [all …]
|
H A D | load_elf_obj.c | 350 lshdr->sh_offset >= shdr[i].sh_offset) in __elfN() 354 cshdr->sh_offset > shdr[i].sh_offset) in __elfN() 362 cshdr->sh_size, (off_t)cshdr->sh_offset) != 0) { in __elfN()
|
/freebsd/contrib/llvm-project/llvm/lib/InterfaceStub/ |
H A D | ELFObjHandler.cpp | 267 DynSym.Content.write(Data + DynSym.Shdr.sh_offset); in write() 268 DynStr.Content.write(Data + DynStr.Shdr.sh_offset); in write() 269 DynTab.Content.write(Data + DynTab.Shdr.sh_offset); in write() 270 ShStrTab.Content.write(Data + ShStrTab.Shdr.sh_offset); in write() 293 StrTab.Shdr.sh_offset = StrTab.Offset; in fillStrTabShdr() 306 SymTab.Shdr.sh_offset = SymTab.Offset; in fillSymTabShdr() 322 DynTab.Shdr.sh_offset = DynTab.Offset; in fillDynTabShdr() 370 return ElfFile.base() + DynSymHdr->sh_offset; in getDynSym()
|
/freebsd/sys/kern/ |
H A D | kern_ctf.c | 162 shdr[hdr->e_shstrndx].sh_size, shdr[hdr->e_shstrndx].sh_offset, in link_elf_ctf_get() 183 shdr[i].sh_offset, UIO_SYSSPACE, IO_NODELOCKED, td->td_ucred, in link_elf_ctf_get() 243 shdr[i].sh_size, shdr[i].sh_offset, UIO_SYSSPACE, IO_NODELOCKED, in link_elf_ctf_get()
|
/freebsd/sys/compat/linux/ |
H A D | linux_vdso.c | 127 dsym = (Elf_Sym *)(base + shdr[i].sh_offset); in __elfN() 128 strtab = base + shdr[shdr[i].sh_link].sh_offset; in __elfN()
|
/freebsd/sys/powerpc/powerpc/ |
H A D | machdep.c | 597 shdr[i].sh_offset); in load_external_symtab() 599 (kernelimg_final + shdr[i].sh_offset); in load_external_symtab() 602 shdr[shdr[i].sh_link].sh_offset); in load_external_symtab() 605 shdr[shdr[i].sh_link].sh_offset); in load_external_symtab()
|
/freebsd/lib/libc/gen/ |
H A D | nlist.c | 169 symoff = shdr[i].sh_offset; in __elf_fdnlist() 171 symstroff = shdr[shdr[i].sh_link].sh_offset; in __elf_fdnlist()
|
/freebsd/contrib/elftoolchain/elfcopy/ |
H A D | binary.c | 81 if (baseoff == -1 || (off_t) sh.sh_offset < baseoff) { in create_binary() 82 baseoff = sh.sh_offset; in create_binary()
|
/freebsd/contrib/file/src/ |
H A D | readelf.h | 211 Elf32_Off sh_offset; member 224 Elf64_Off sh_offset; member
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Object/ |
H A D | ELF.h | 175 if (Sec.sh_offset < Phdr.p_offset) in checkSectionOffsets() 180 return (Sec.sh_offset + 1 <= Phdr.p_offset + Phdr.p_filesz); in checkSectionOffsets() 181 return Sec.sh_offset + Sec.sh_size <= Phdr.p_offset + Phdr.p_filesz; in checkSectionOffsets() 432 if (Shdr.sh_offset + Shdr.sh_size > getBufSize()) { in notes_begin() 434 createError("invalid offset (0x" + Twine::utohexstr(Shdr.sh_offset) + in notes_begin() 445 return Elf_Note_Iterator(base() + Shdr.sh_offset, Shdr.sh_size, in notes_begin() 621 uintX_t Offset = Sec.sh_offset; in getSectionContentsAsArray() 914 FakeShdr.sh_offset = Phdr.p_offset; in createFakeSections()
|
/freebsd/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/ |
H A D | DebugObjectManagerPlugin.cpp | 84 if (Header->sh_offset + Header->sh_size > Buffer.size()) in validateInBounds() 88 Name, Start + Header->sh_offset, in validateInBounds() 89 Start + Header->sh_offset + Header->sh_size, Start, End), in validateInBounds()
|
/freebsd/cddl/contrib/opensolaris/tools/ctf/cvt/ |
H A D | output.c | 561 shdr.sh_offset = new_offset; in write_file() 654 new_offset = (off_t)shdr.sh_offset; in write_file() 678 shdr.sh_offset = new_offset; in write_file()
|
/freebsd/sys/sys/ |
H A D | elf32.h | 94 Elf32_Off sh_offset; /* Offset in file. */ member
|