Home
last modified time | relevance | path

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

123

/freebsd-13.1/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-13.1/usr.sbin/crunch/crunchide/
H A Dexec_elf32.c305 shdrshdr.sh_offset = ehdr.e_shoff; in ELFNAMEEND()
316 if (xewtoh(shdrp[i].sh_offset) > in ELFNAMEEND()
317 xewtoh(layoutp[m].shdr->sh_offset)) in ELFNAMEEND()
342 if ((size_t)xreadatoff(fd, shstrtabp, xewtoh(shstrtabshdr->sh_offset), in ELFNAMEEND()
365 off = xewtoh(layoutp[i].shdr->sh_offset); in ELFNAMEEND()
439 soff = xewtoh(layoutp[i - 1].shdr->sh_offset) + in ELFNAMEEND()
443 layoutp[i].shdr->sh_offset = htoxew(soff); in ELFNAMEEND()
466 ehdr.e_shoff != shdrshdr.sh_offset) { in ELFNAMEEND()
467 ehdr.e_shoff = shdrshdr.sh_offset; in ELFNAMEEND()
475 off = xewtoh(layoutp[i].shdr->sh_offset); in ELFNAMEEND()
/freebsd-13.1/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-13.1/cddl/contrib/opensolaris/lib/libdtrace/common/
H A Ddt_link.c528 shp->sh_offset = off; in dump_elf32()
537 shp->sh_offset = off; in dump_elf32()
540 off = shp->sh_offset + shp->sh_size; in dump_elf32()
546 shp->sh_offset = off; in dump_elf32()
557 shp->sh_offset = off; in dump_elf32()
580 shp->sh_offset = off; in dump_elf32()
671 shp->sh_offset = off; in dump_elf64()
680 shp->sh_offset = off; in dump_elf64()
689 shp->sh_offset = off; in dump_elf64()
700 shp->sh_offset = off; in dump_elf64()
[all …]
/freebsd-13.1/sys/mips/mips/
H A Delf_trampoline.c142 if (shdr[i].sh_offset != 0 && in load_kernel()
188 shdr[symtabindex].sh_offset + kstart, in load_kernel()
199 shdr[symstrindex].sh_offset + kstart, in load_kernel()
/freebsd-13.1/sys/dev/ksyms/
H A Dksyms.c330 hdr->kh_shdr[SHDR_SYMTAB].sh_offset = sizeof(*hdr); in ksyms_snapshot()
342 hdr->kh_shdr[SHDR_STRTAB].sh_offset = in ksyms_snapshot()
343 hdr->kh_shdr[SHDR_SYMTAB].sh_offset + ts->ts_symsz; in ksyms_snapshot()
356 hdr->kh_shdr[SHDR_SHSTRTAB].sh_offset = in ksyms_snapshot()
368 to.to_symoff = hdr->kh_shdr[SHDR_SYMTAB].sh_offset; in ksyms_snapshot()
369 to.to_stroff = hdr->kh_shdr[SHDR_STRTAB].sh_offset; in ksyms_snapshot()
/freebsd-13.1/usr.bin/gprof/
H A Delf.c100 symtab = (const Elf_Sym *)(base + sh_symtab->sh_offset); in elf_getnfile()
102 strtab = (const char *)(base + sh_strtab->sh_offset); in elf_getnfile()
/freebsd-13.1/sys/compat/linux/
H A Dlinux_vdso.c209 sym = (Elf_Sym *)((caddr_t)ehdr + shdr[i].sh_offset); in __elfN()
236 shdr[__elfN(symstrindex)].sh_offset); in __elfN()
238 shdr[__elfN(symtabindex)].sh_offset); in __elfN()
/freebsd-13.1/stand/common/
H A Dload_elf.c196 CONVERT_FIELD(b, sh_offset, e); \ in elf_section_header_convert()
686 shdr[ehdr->e_shstrndx].sh_offset, chunk);
715 if (shdr[i].sh_offset >= phdr[j].p_offset &&
716 (shdr[i].sh_offset + shdr[i].sh_size <=
718 shdr[i].sh_offset = 0;
723 if (shdr[i].sh_offset == 0 || shdr[i].sh_size == 0)
760 (uintmax_t)shdr[i].sh_size, (uintmax_t)shdr[i].sh_offset,
769 if (VECTX_LSEEK(VECTX_HANDLE(ef), (off_t)shdr[i].sh_offset, SEEK_SET) == -1) {
994 shstrtab = alloc_pread(VECTX_HANDLE(&ef), shdr[ef.ehdr->e_shstrndx].sh_offset,
1035 sh_data[0]->sh_offset);
[all …]
H A Dload_elf_obj.c353 lshdr->sh_offset >= shdr[i].sh_offset) in __elfN()
357 cshdr->sh_offset > shdr[i].sh_offset) in __elfN()
365 cshdr->sh_size, (off_t)cshdr->sh_offset) != 0) { in __elfN()
/freebsd-13.1/sys/kern/
H A Dkern_ctf.c154 shdr[hdr->e_shstrndx].sh_size, shdr[hdr->e_shstrndx].sh_offset, in link_elf_ctf_get()
173 shdr[i].sh_offset, UIO_SYSSPACE, IO_NODELOCKED, td->td_ucred, in link_elf_ctf_get()
229 shdr[i].sh_size, shdr[i].sh_offset, UIO_SYSSPACE, IO_NODELOCKED, in link_elf_ctf_get()
/freebsd-13.1/usr.sbin/kldxref/
H A Def_obj.c469 if (ef_obj_read_entry(ef, shdr[symtabindex].sh_offset, in ef_obj_open()
476 if (ef_obj_read_entry(ef, shdr[symstrindex].sh_offset, in ef_obj_open()
488 if (ef_obj_read_entry(ef, shdr[shstrindex].sh_offset, in ef_obj_open()
539 if (ef_obj_read(ef, shdr[i].sh_offset, in ef_obj_open()
568 if (ef_obj_read_entry(ef, shdr[i].sh_offset, in ef_obj_open()
580 if (ef_obj_read_entry(ef, shdr[i].sh_offset, in ef_obj_open()
/freebsd-13.1/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()
/freebsd-13.1/sys/x86/xen/
H A Dpv.c495 if (shdr[i].sh_offset == 0) in xen_pvh_parse_symtab()
497 ksymtab = (uintptr_t)((uint8_t *)ehdr + shdr[i].sh_offset); in xen_pvh_parse_symtab()
500 if (shdr[j].sh_offset == 0) in xen_pvh_parse_symtab()
502 kstrtab = (uintptr_t)((uint8_t *)ehdr + shdr[j].sh_offset); in xen_pvh_parse_symtab()
/freebsd-13.1/sys/powerpc/powerpc/
H A Dmachdep.c600 shdr[i].sh_offset); in load_external_symtab()
602 (kernelimg_final + shdr[i].sh_offset); in load_external_symtab()
605 shdr[shdr[i].sh_link].sh_offset); in load_external_symtab()
608 shdr[shdr[i].sh_link].sh_offset); in load_external_symtab()
/freebsd-13.1/lib/libc/gen/
H A Dnlist.c173 symoff = shdr[i].sh_offset; in __elf_fdnlist()
175 symstroff = shdr[shdr[i].sh_link].sh_offset; in __elf_fdnlist()
/freebsd-13.1/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-13.1/contrib/file/src/
H A Dreadelf.h211 Elf32_Off sh_offset; member
224 Elf64_Off sh_offset; member
/freebsd-13.1/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/
H A DDebugObjectManagerPlugin.cpp92 if (Header->sh_offset + Header->sh_size > Buffer.size()) in validateInBounds()
96 Name, Start + Header->sh_offset, in validateInBounds()
97 Start + Header->sh_offset + Header->sh_size, Start, End), in validateInBounds()
/freebsd-13.1/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-13.1/sys/sys/
H A Delf32.h96 Elf32_Off sh_offset; /* Offset in file. */ member

123