Home
last modified time | relevance | path

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

123

/freebsd-12.1/contrib/elftoolchain/libelf/
H A Delf_data.c45 uint64_t sh_align, sh_offset, sh_size; in elf_getdata() local
79 sh_offset = (uint64_t) s->s_shdr.s_shdr32.sh_offset; in elf_getdata()
84 sh_offset = s->s_shdr.s_shdr64.sh_offset; in elf_getdata()
96 (sh_offset > e->e_rawsize || sh_size > e->e_rawsize - sh_offset))) { in elf_getdata()
156 e->e_rawfile + sh_offset, count, in elf_getdata()
218 uint64_t sh_align, sh_offset, sh_size; in elf_rawdata() local
241 sh_offset = (uint64_t) s->s_shdr.s_shdr32.sh_offset; in elf_rawdata()
246 sh_offset = s->s_shdr.s_shdr64.sh_offset; in elf_rawdata()
257 (sh_offset > e->e_rawsize || sh_size > e->e_rawsize - sh_offset)) { in elf_rawdata()
266 e->e_rawfile + sh_offset; in elf_rawdata()
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()
275 sh_offset % sh_align || in _libelf_compute_section_extents()
277 sh_offset % _libelf_falign(elftype, ec)) { in _libelf_compute_section_extents()
311 sh_offset = roundup((uint64_t) rc, sh_align); in _libelf_compute_section_extents()
319 shdr32->sh_offset = (uint32_t) sh_offset; in _libelf_compute_section_extents()
324 shdr64->sh_offset = sh_offset; in _libelf_compute_section_extents()
333 s->s_offset = sh_offset; in _libelf_compute_section_extents()
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_scn.c128 scn->s_shdr.s_shdr32.sh_offset; in _libelf_load_section_headers()
132 scn->s_shdr.s_shdr64.sh_offset; in _libelf_load_section_headers()
/freebsd-12.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 off = xewtoh(layoutp[i - 1].shdr->sh_offset) + in ELFNAMEEND()
443 layoutp[i].shdr->sh_offset = htoxew(off); 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-12.1/cddl/contrib/opensolaris/lib/libctf/common/
H A Dctf_lib.c169 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-12.1/sys/arm/arm/
H A Delf_trampoline.c332 shdr[i].sh_offset >= in load_kernel()
334 (shdr[i].sh_offset + in load_kernel()
338 shdr[i].sh_offset = 0; in load_kernel()
343 if (shdr[i].sh_offset != 0 && in load_kernel()
355 shdr[symtabindex].sh_offset + kstart), in load_kernel()
359 (void *)(shdr[symstrindex].sh_offset + in load_kernel()
/freebsd-12.1/cddl/contrib/opensolaris/lib/libdtrace/common/
H A Ddt_link.c557 shp->sh_offset = off; in dump_elf32()
566 shp->sh_offset = off; in dump_elf32()
569 off = shp->sh_offset + shp->sh_size; in dump_elf32()
575 shp->sh_offset = off; in dump_elf32()
586 shp->sh_offset = off; in dump_elf32()
613 shp->sh_offset = off; in dump_elf32()
703 shp->sh_offset = off; in dump_elf64()
712 shp->sh_offset = off; in dump_elf64()
721 shp->sh_offset = off; in dump_elf64()
732 shp->sh_offset = off; in dump_elf64()
[all …]
/freebsd-12.1/contrib/binutils/include/elf/
H A Dinternal.h87 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) \
H A Dexternal.h105 unsigned char sh_offset[4]; /* Section file offset */ member
118 unsigned char sh_offset[8]; /* Section file offset */ member
/freebsd-12.1/sys/mips/mips/
H A Delf_trampoline.c143 if (shdr[i].sh_offset != 0 && in load_kernel()
189 shdr[symtabindex].sh_offset + kstart, in load_kernel()
200 shdr[symstrindex].sh_offset + kstart, in load_kernel()
/freebsd-12.1/sys/dev/ksyms/
H A Dksyms.c320 hdr->kh_shdr[SHDR_SYMTAB].sh_offset = sizeof(*hdr); in ksyms_snapshot()
332 hdr->kh_shdr[SHDR_STRTAB].sh_offset = in ksyms_snapshot()
333 hdr->kh_shdr[SHDR_SYMTAB].sh_offset + ts->ts_symsz; in ksyms_snapshot()
346 hdr->kh_shdr[SHDR_SHSTRTAB].sh_offset = in ksyms_snapshot()
358 to.to_symoff = hdr->kh_shdr[SHDR_SYMTAB].sh_offset; in ksyms_snapshot()
359 to.to_stroff = hdr->kh_shdr[SHDR_STRTAB].sh_offset; in ksyms_snapshot()
/freebsd-12.1/stand/common/
H A Dload_elf.c184 CONVERT_FIELD(b, sh_offset, e); \ in elf_section_header_convert()
625 shstr = alloc_pread(ef->fd, shdr[ehdr->e_shstrndx].sh_offset, in __elfN()
655 if (shdr[i].sh_offset >= phdr[j].p_offset && in __elfN()
656 (shdr[i].sh_offset + shdr[i].sh_size <= in __elfN()
658 shdr[i].sh_offset = 0; in __elfN()
663 if (shdr[i].sh_offset == 0 || shdr[i].sh_size == 0) in __elfN()
707 (uintmax_t)shdr[i].sh_size, (uintmax_t)shdr[i].sh_offset, in __elfN()
716 if (lseek(ef->fd, (off_t)shdr[i].sh_offset, SEEK_SET) == -1) { in __elfN()
938 shstrtab = alloc_pread(ef.fd, shdr[ef.ehdr->e_shstrndx].sh_offset, in __elfN()
979 sh_data[0]->sh_offset); in __elfN()
[all …]
H A Dload_elf_obj.c320 lshdr->sh_offset >= shdr[i].sh_offset) in __elfN()
324 cshdr->sh_offset > shdr[i].sh_offset) in __elfN()
332 cshdr->sh_size, (off_t)cshdr->sh_offset) != 0) { in __elfN()
/freebsd-12.1/sys/compat/linux/
H A Dlinux_vdso.c205 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-12.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-12.1/contrib/elftoolchain/elfcopy/
H A Dbinary.c79 if (base == -1 || (off_t) sh.sh_offset < base) in create_binary()
80 base = sh.sh_offset; in create_binary()
114 off = sh.sh_offset - base; in create_binary()
/freebsd-12.1/contrib/binutils/binutils/
H A Dreadelf.c3522 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()
4262 (unsigned long) section->sh_offset, in process_section_headers()
4280 if ((long) section->sh_offset == section->sh_offset) in process_section_headers()
4326 if ((long) section->sh_offset == section->sh_offset) in process_section_headers()
4346 if ((long) section->sh_offset == section->sh_offset) in process_section_headers()
4717 rel_offset = section->sh_offset; in process_relocs()
5166 (unsigned long) unwsec->sh_offset, in ia64_process_unwind()
5506 (unsigned long) sec->sh_offset, in hppa_process_unwind()
[all …]
/freebsd-12.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-12.1/sys/x86/xen/
H A Dpv.c497 if (shdr[i].sh_offset == 0) in xen_pvh_parse_symtab()
499 ksymtab = (uintptr_t)((uint8_t *)ehdr + shdr[i].sh_offset); in xen_pvh_parse_symtab()
502 if (shdr[j].sh_offset == 0) in xen_pvh_parse_symtab()
504 kstrtab = (uintptr_t)((uint8_t *)ehdr + shdr[j].sh_offset); in xen_pvh_parse_symtab()
/freebsd-12.1/sys/kern/
H A Dkern_ctf.c173 shdr[hdr->e_shstrndx].sh_size, shdr[hdr->e_shstrndx].sh_offset,
192 shdr[i].sh_offset, UIO_SYSSPACE, IO_NODELOCKED, td->td_ucred,
255 shdr[i].sh_size, shdr[i].sh_offset, UIO_SYSSPACE, IO_NODELOCKED,
/freebsd-12.1/contrib/binutils/bfd/
H A Delfcode.h306 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-12.1/contrib/file/src/
H A Dreadelf.h211 Elf32_Off sh_offset; member
224 Elf64_Off sh_offset; member
/freebsd-12.1/lib/libc/gen/
H A Dnlist.c282 symoff = shdr[i].sh_offset; in __elf_fdnlist()
284 symstroff = shdr[shdr[i].sh_link].sh_offset; in __elf_fdnlist()
/freebsd-12.1/contrib/llvm/include/llvm/Object/
H A DELF.h209 if (Shdr.sh_offset + Shdr.sh_size > getBufSize()) { in notes_begin()
213 return Elf_Note_Iterator(base() + Shdr.sh_offset, Shdr.sh_size, Err); in notes_begin()
359 uintX_t Offset = Sec->sh_offset; in getSectionContentsAsArray()
509 size_t Pos = Section->sh_offset + Entry * sizeof(T); in getEntry()

123