Home
last modified time | relevance | path

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

123

/freebsd-9-stable/lib/libelf/
Delf_data.c45 uint64_t sh_align, sh_offset, sh_size; in elf_getdata() local
71 sh_offset = (uint64_t) s->s_shdr.s_shdr32.sh_offset; in elf_getdata()
76 sh_offset = s->s_shdr.s_shdr64.sh_offset; in elf_getdata()
88 sh_offset + sh_size > (uint64_t) e->e_rawsize)) { in elf_getdata()
134 if (!(*xlate)(d->d_buf, d->d_size, e->e_rawfile + sh_offset, count, in elf_getdata()
194 uint64_t sh_align, sh_offset, sh_size; in elf_rawdata() local
214 sh_offset = (uint64_t) s->s_shdr.s_shdr32.sh_offset; in elf_rawdata()
219 sh_offset = s->s_shdr.s_shdr64.sh_offset; in elf_rawdata()
233 e->e_rawfile + sh_offset; in elf_rawdata()
Delf_update.c95 uint64_t sh_align, sh_entsize, sh_offset, sh_size; in _libelf_compute_section_extents() local
106 sh_offset = (uint64_t) shdr32->sh_offset; in _libelf_compute_section_extents()
112 sh_offset = shdr64->sh_offset; in _libelf_compute_section_extents()
222 if (scn_alignment > sh_align || sh_offset % sh_align || in _libelf_compute_section_extents()
257 sh_offset = roundup(rc, sh_align); in _libelf_compute_section_extents()
265 shdr32->sh_offset = (uint32_t) sh_offset; in _libelf_compute_section_extents()
270 shdr64->sh_offset = sh_offset; in _libelf_compute_section_extents()
279 s->s_offset = sh_offset; in _libelf_compute_section_extents()
Dgelf_shdr.c76 d->sh_offset = (Elf64_Off) sh32->sh_offset; in gelf_getshdr()
123 LIBELF_COPY_U32(sh32, s, sh_offset); in gelf_update_shdr()
Delf_scn.c109 scn->s_shdr.s_shdr32.sh_offset; in _libelf_load_scn()
113 scn->s_shdr.s_shdr64.sh_offset; in _libelf_load_scn()
/freebsd-9-stable/usr.sbin/crunch/crunchide/
Dexec_elf32.c311 shdrshdr.sh_offset = ehdr.e_shoff; in ELFNAMEEND()
322 if (xewtoh(shdrp[i].sh_offset) > in ELFNAMEEND()
323 xewtoh(layoutp[m].shdr->sh_offset)) in ELFNAMEEND()
347 if ((size_t)xreadatoff(fd, shstrtabp, xewtoh(shstrtabshdr->sh_offset), in ELFNAMEEND()
368 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-9-stable/contrib/llvm/include/llvm/Object/
DELF.h354 (const char *)(base() + sec->sh_offset)); in begin_rela()
360 (const char *)(base() + sec->sh_offset + sec->sh_size)); in end_rela()
365 (const char *)(base() + sec->sh_offset)); in begin_rel()
370 (const char *)(base() + sec->sh_offset + sec->sh_size)); in end_rel()
425 const char *sec_start = (const char*)base() + sec->sh_offset; in LoadVersionDefs()
450 const char *sec_start = (const char *)base() + sec->sh_offset; in LoadVersionNeeds()
526 if (Sec->sh_offset + Sec->sh_size > Buf->getBufferSize()) in getSectionContents()
528 const uint8_t *Start = base() + Sec->sh_offset; in getSectionContents()
577 const char *strtab = (const char *)base() + sh->sh_offset; in VerifyStrTab()
664 DynSymRegion.Addr = base() + SecI->sh_offset; in ELFFile()
[all …]
/freebsd-9-stable/cddl/contrib/opensolaris/lib/libdtrace/common/
Ddt_link.c75 (lseek64(fd, (off64_t)elf_file.shdr[(index)].sh_offset, SEEK_SET) != \
76 (off64_t)elf_file.shdr[(index)].sh_offset || \
552 shp->sh_offset = off; in dump_elf32()
555 off = P2ROUNDUP(shp->sh_offset + shp->sh_size, 8); in dump_elf32()
561 shp->sh_offset = off; in dump_elf32()
564 off = shp->sh_offset + shp->sh_size; in dump_elf32()
570 shp->sh_offset = off; in dump_elf32()
573 off = P2ROUNDUP(shp->sh_offset + shp->sh_size, 4); in dump_elf32()
581 shp->sh_offset = off; in dump_elf32()
585 off = P2ROUNDUP(shp->sh_offset + shp->sh_size, 4); in dump_elf32()
[all …]
/freebsd-9-stable/cddl/contrib/opensolaris/lib/libctf/common/
Dctf_lib.c169 dst->sh_offset = src->sh_offset; in shdr_to_gelf()
340 (sp[hdr.e64.e_shstrndx].sh_offset & ~_PAGEMASK); in ctf_fdopen()
343 fd, sp[hdr.e64.e_shstrndx].sh_offset & _PAGEMASK); in ctf_fdopen()
346 (sp[hdr.e64.e_shstrndx].sh_offset & ~_PAGEMASK); in ctf_fdopen()
375 ctfsect.cts_offset = (off64_t)shp->sh_offset; in ctf_fdopen()
383 symsect.cts_offset = (off64_t)shp->sh_offset; in ctf_fdopen()
390 strsect.cts_offset = (off64_t)lhp->sh_offset; in ctf_fdopen()
/freebsd-9-stable/contrib/binutils/include/elf/
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) \
Dexternal.h105 unsigned char sh_offset[4]; /* Section file offset */ member
118 unsigned char sh_offset[8]; /* Section file offset */ member
/freebsd-9-stable/sys/arm/arm/
Delf_trampoline.c437 shdr[i].sh_offset >= in load_kernel()
439 (shdr[i].sh_offset + in load_kernel()
443 shdr[i].sh_offset = 0; in load_kernel()
448 if (shdr[i].sh_offset != 0 && in load_kernel()
460 shdr[symtabindex].sh_offset + kstart), in load_kernel()
464 (void *)(shdr[symstrindex].sh_offset + in load_kernel()
/freebsd-9-stable/sys/mips/mips/
Delf_trampoline.c140 if (shdr[i].sh_offset != 0 && in load_kernel()
186 shdr[symtabindex].sh_offset + kstart, in load_kernel()
197 shdr[symstrindex].sh_offset + kstart, in load_kernel()
/freebsd-9-stable/sys/dev/ksyms/
Dksyms.c303 hdr->kh_shdr[SHDR_SYMTAB].sh_offset = sizeof(*hdr); in ksyms_snapshot()
315 hdr->kh_shdr[SHDR_STRTAB].sh_offset = in ksyms_snapshot()
316 hdr->kh_shdr[SHDR_SYMTAB].sh_offset + ts->ts_symsz; in ksyms_snapshot()
329 hdr->kh_shdr[SHDR_SHSTRTAB].sh_offset = in ksyms_snapshot()
340 to.to_symoff = uaddr + hdr->kh_shdr[SHDR_SYMTAB].sh_offset; in ksyms_snapshot()
341 to.to_stroff = uaddr + hdr->kh_shdr[SHDR_STRTAB].sh_offset; in ksyms_snapshot()
/freebsd-9-stable/usr.sbin/kldxref/
Def_obj.c441 if (ef_obj_read_entry(ef, shdr[symtabindex].sh_offset, in ef_obj_open()
448 if (ef_obj_read_entry(ef, shdr[symstrindex].sh_offset, in ef_obj_open()
460 if (ef_obj_read_entry(ef, shdr[shstrindex].sh_offset, in ef_obj_open()
511 if (ef_obj_read(ef, shdr[i].sh_offset, in ef_obj_open()
540 if (ef_obj_read_entry(ef, shdr[i].sh_offset, in ef_obj_open()
552 if (ef_obj_read_entry(ef, shdr[i].sh_offset, in ef_obj_open()
/freebsd-9-stable/usr.bin/gprof/
Delf.c98 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-9-stable/contrib/binutils/binutils/
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()
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-9-stable/sys/boot/common/
Dload_elf_obj.c316 lshdr->sh_offset >= shdr[i].sh_offset) in __elfN()
320 cshdr->sh_offset > shdr[i].sh_offset) in __elfN()
328 cshdr->sh_size, (off_t)cshdr->sh_offset) != 0) { in __elfN()
Dload_elf.c396 if (shdr[i].sh_offset >= phdr[j].p_offset && in __elfN()
397 (shdr[i].sh_offset + shdr[i].sh_size <= in __elfN()
399 shdr[i].sh_offset = 0; in __elfN()
404 if (shdr[i].sh_offset == 0 || shdr[i].sh_size == 0) in __elfN()
441 (uintmax_t)shdr[i].sh_size, (uintmax_t)shdr[i].sh_offset, in __elfN()
449 if (lseek(ef->fd, (off_t)shdr[i].sh_offset, SEEK_SET) == -1) { in __elfN()
/freebsd-9-stable/sys/kern/
Dkern_ctf.c184 shdr[hdr->e_shstrndx].sh_size, shdr[hdr->e_shstrndx].sh_offset, in link_elf_ctf_get()
204 shdr[i].sh_offset, UIO_SYSSPACE, IO_NODELOCKED, td->td_ucred, in link_elf_ctf_get()
269 shdr[i].sh_size, shdr[i].sh_offset, UIO_SYSSPACE, IO_NODELOCKED, in link_elf_ctf_get()
Dlink_elf_obj.c621 shdr[symtabindex].sh_size, shdr[symtabindex].sh_offset, in link_elf_load_file()
637 shdr[symstrindex].sh_size, shdr[symstrindex].sh_offset, in link_elf_load_file()
656 shdr[shstrindex].sh_size, shdr[shstrindex].sh_offset, in link_elf_load_file()
783 shdr[i].sh_size, shdr[i].sh_offset, in link_elf_load_file()
824 shdr[i].sh_size, shdr[i].sh_offset, in link_elf_load_file()
843 shdr[i].sh_size, shdr[i].sh_offset, in link_elf_load_file()
/freebsd-9-stable/contrib/file/src/
Dreadelf.h211 Elf32_Off sh_offset; member
224 Elf64_Off sh_offset; member
/freebsd-9-stable/contrib/binutils/bfd/
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-9-stable/lib/libc/gen/
Dnlist.c285 symoff = shdr[i].sh_offset;
287 symstroff = shdr[shdr[i].sh_link].sh_offset;
/freebsd-9-stable/sys/xen/interface/
Delfstructs.h196 Elf32_Off sh_offset; /* file offset */ member
209 Elf64_Off sh_offset; /* file offset */ member
/freebsd-9-stable/cddl/contrib/opensolaris/tools/ctf/cvt/
Doutput.c565 shdr.sh_offset = new_offset; in write_file()
658 new_offset = (off_t)shdr.sh_offset; in write_file()
682 shdr.sh_offset = new_offset; in write_file()

123