Home
last modified time | relevance | path

Searched refs:sh_offset (Results 1 – 25 of 59) sorted by relevance

123

/freebsd/contrib/elftoolchain/libelf/
H A Delf_data.c45 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 Dgelf_shdr.c75 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 Delf_update.c122 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 Delf_scn.c129 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 Delf_types.m4200 `sh_offset, OFF',
213 `sh_offset, OFF',
/freebsd/usr.sbin/crunch/crunchide/
H A Dexec_elf32.c303 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 Dctf_lib.c170 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 Ddt_link.c61 (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 Dpv.c237 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 Def.c261 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 Dksyms.c328 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 Delf.c94 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 Dload_elf.c190 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 Dload_elf_obj.c350 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 DELFObjHandler.cpp267 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 Dkern_ctf.c162 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 Dlinux_vdso.c127 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 Dmachdep.c597 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 Dnlist.c169 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 Dbinary.c81 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 Dreadelf.h211 Elf32_Off sh_offset; member
224 Elf64_Off sh_offset; member
/freebsd/contrib/llvm-project/llvm/include/llvm/Object/
H A DELF.h175 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 DDebugObjectManagerPlugin.cpp84 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 Doutput.c561 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 Delf32.h94 Elf32_Off sh_offset; /* Offset in file. */ member

123