/openbsd/lib/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 | 121 uint64_t sh_align, sh_entsize, sh_offset, sh_size; in _libelf_compute_section_extents() local 131 sh_offset = (uint64_t) shdr32->sh_offset; in _libelf_compute_section_extents() 137 sh_offset = shdr64->sh_offset; in _libelf_compute_section_extents() 280 sh_offset % sh_align || in _libelf_compute_section_extents() 282 sh_offset % _libelf_falign(elftype, ec)) { in _libelf_compute_section_extents() 316 sh_offset = roundup((uint64_t) rc, sh_align); in _libelf_compute_section_extents() 324 shdr32->sh_offset = (uint32_t) sh_offset; in _libelf_compute_section_extents() 329 shdr64->sh_offset = sh_offset; in _libelf_compute_section_extents() 338 s->s_offset = sh_offset; in _libelf_compute_section_extents()
|
H A D | elf_scn.c | 116 scn->s_shdr.s_shdr32.sh_offset; in _libelf_load_section_headers() 120 scn->s_shdr.s_shdr64.sh_offset; in _libelf_load_section_headers()
|
/openbsd/sys/ddb/ |
H A D | db_elf.c | 120 if (shp[i].sh_offset == 0) in db_elf_sym_init() 123 shp[i].sh_offset); in db_elf_sym_init() 125 shp[i].sh_offset + shp[i].sh_size); in db_elf_sym_init() 127 if (shp[j].sh_offset == 0) in db_elf_sym_init() 130 strtab_end = (char *)symtab + shp[j].sh_offset + in db_elf_sym_init() 141 strtab_end = (char *)symtab + shp[i].sh_offset + in db_elf_sym_init() 145 shp[i].sh_offset); in db_elf_sym_init() 147 shp[i].sh_offset + shp[i].sh_size); in db_elf_sym_init() 200 shp[shp[i].sh_link].sh_offset); in db_elf_find_strtab() 202 return ((const char *)elf + shp[i].sh_offset); in db_elf_find_strtab() [all …]
|
H A D | db_dwarf.c | 492 if (shdr.sh_offset > filesize) in main() 494 if (shdr.sh_size > filesize - shdr.sh_offset) in main() 496 const char *shstrtab = p + shdr.sh_offset; in main() 510 if (shdr.sh_offset > filesize) in main() 512 if (shdr.sh_size > filesize - shdr.sh_offset) in main() 514 const char *linetab = p + shdr.sh_offset; in main()
|
/openbsd/usr.bin/ctfconv/ |
H A D | elf.c | 97 if (sh->sh_offset > filesize) { in elf_getshstab() 101 if (sh->sh_size > filesize - sh->sh_offset) { in elf_getshstab() 106 *shstab = p + sh->sh_offset; in elf_getshstab() 138 if (sh->sh_offset > filesize) in elf_getsymtab() 149 *symtab = (Elf_Sym *)(p + sh->sh_offset); in elf_getsymtab() 170 *strtab = p + sh->sh_offset; in elf_getsymtab() 201 if (sh->sh_offset > filesize) in elf_getsection() 209 sdata = p + sh->sh_offset; in elf_getsection() 298 if (sh->sh_offset > filesize) in elf_reloc_apply() 306 rela = (Elf_RelA *)(p + sh->sh_offset); in elf_reloc_apply() [all …]
|
/openbsd/usr.sbin/config/ |
H A D | exec_elf.c | 66 s[i].sh_addr + s[i].sh_offset]; in adjust() 86 if (((x - elf_total) >= s[i].sh_offset) && in readjust() 87 ((x - elf_total) <= (s[i].sh_offset + s[i].sh_size))) in readjust() 89 (unsigned long)s[i].sh_addr - s[i].sh_offset; in readjust() 128 if ((char *)&elf_shdr[elf_ex.e_shstrndx].sh_offset + in loadkernel() 129 sizeof(elf_shdr[elf_ex.e_shstrndx].sh_offset) >= in loadkernel() 133 elf_shstrtab = &elf_total[elf_shdr[elf_ex.e_shstrndx].sh_offset]; in loadkernel()
|
/openbsd/gnu/usr.bin/binutils-2.17/include/elf/ |
H A D | internal.h | 87 file_ptr sh_offset; /* Section file offset */ member 266 : ((bfd_vma) sec_hdr->sh_offset >= segment->p_offset \ 267 && (sec_hdr->sh_offset + sec_hdr->sh_size \
|
H A D | external.h | 105 unsigned char sh_offset[4]; /* Section file offset */ member 118 unsigned char sh_offset[8]; /* Section file offset */ member
|
/openbsd/usr.sbin/crunchgen/ |
H A D | elf_hide.c | 112 printf("sh_offset %x\n", pshdr->sh_offset); in elf_hide() 164 shstrtab = (char *) (pexe + pshdr->sh_offset); in load_shstr_tab() 205 symtab = (Elf_Sym *) (pexe + psymshdr->sh_offset); in load_symtab() 261 strtab = (char *) (pexe + pshdr->sh_offset); in load_strtab() 414 prela = (Elf_RelA *) (pexe + pshdr->sh_offset); in renum_reloc_syms() 431 prel = (Elf_Rel *) (pexe + pshdr->sh_offset); in renum_reloc_syms()
|
/openbsd/sys/arch/sparc64/stand/ofwboot/ |
H A D | elf64_exec.c | 202 if (lseek(fd, (off_t)shp[elf->e_shstrndx].sh_offset, SEEK_SET) == -1) { in elf64_exec() 217 shp->sh_offset = 0; in elf64_exec() 257 (void)lseek(fd, shp->sh_offset, SEEK_SET); in elf64_exec() 263 shp->sh_offset = off; in elf64_exec()
|
/openbsd/gnu/usr.bin/binutils/include/elf/ |
H A D | external.h | 105 unsigned char sh_offset[4]; /* Section file offset */ member 118 unsigned char sh_offset[8]; /* Section file offset */ member
|
/openbsd/usr.bin/gprof/ |
H A D | elf.c | 88 symtab = (const Elf_Sym *)(base + sh_symtab->sh_offset); in getnfile() 90 strtab = (const char *)(base + sh_strtab->sh_offset); in getnfile()
|
/openbsd/gnu/llvm/compiler-rt/lib/hwasan/scripts/ |
H A D | hwasan_symbolize | 69 sh_offset, = struct.unpack_from('<Q', buffer=mv, offset=sh_offset_offset) 71 return sh_offset, sh_size 83 sh_offset, sh_size = handle_Shdr(mv[start: start + Shdr_size]) 84 if sh_offset is None: 86 note_hdr = mv[sh_offset: sh_offset + sh_size]
|
/openbsd/usr.sbin/kvm_mkdb/ |
H A D | nlist.c | 112 symstroff = sh[i].sh_offset; in __elf_knlist() 116 symoff = sh[i].sh_offset; in __elf_knlist() 121 kernoffs = sh[i].sh_offset; in __elf_knlist()
|
/openbsd/gnu/llvm/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()
|
/openbsd/usr.bin/nm/ |
H A D | elf.c | 207 shdr->sh_offset = swap_off(shdr->sh_offset); in elf_fix_shdrs() 444 fileno(fp), foff + shdr[i].sh_offset); in elf_symloadx() 452 if (fseeko(fp, foff + shdr[i].sh_offset, SEEK_SET)) { in elf_symloadx() 528 if (fseeko(fp, foff + shdr[eh->e_shstrndx].sh_offset, SEEK_SET)) { in elf_symload()
|
/openbsd/gnu/usr.bin/binutils-2.17/binutils/ |
H A D | readelf.c | 3773 dynamic_addr = sec->sh_offset; in process_program_headers() 3899 internal->sh_offset = BYTE_GET (shdrs[i].sh_offset); in get_32bit_section_headers() 3944 internal->sh_offset = BYTE_GET (shdrs[i].sh_offset); in get_64bit_section_headers() 4495 (unsigned long) section->sh_offset, in process_section_headers() 4513 if ((long) section->sh_offset == section->sh_offset) in process_section_headers() 4559 if ((long) section->sh_offset == section->sh_offset) in process_section_headers() 4579 if ((long) section->sh_offset == section->sh_offset) in process_section_headers() 4952 rel_offset = section->sh_offset; in process_relocs() 5405 (unsigned long) unwsec->sh_offset, in ia64_process_unwind() 5745 (unsigned long) sec->sh_offset, in hppa_process_unwind() [all …]
|
/openbsd/sys/lib/libsa/ |
H A D | loadfile_elf.c | 208 if (lseek(fd, (off_t)shp[elf->e_shstrndx].sh_offset, SEEK_SET) == -1) { in ELFNAME() 240 if (lseek(fd, (off_t)shp[i].sh_offset, in ELFNAME() 257 shp[i].sh_offset = off; in ELFNAME()
|
/openbsd/gnu/usr.bin/binutils/binutils/ |
H A D | readelf.c | 3164 && (section->sh_offset + section->sh_size in process_program_headers() 3236 internal->sh_offset = BYTE_GET (shdrs[i].sh_offset); in get_32bit_section_headers() 3281 internal->sh_offset = BYTE_GET (shdrs[i].sh_offset); in get_64bit_section_headers() 3613 (unsigned long) section->sh_offset, in process_section_headers() 3628 if ((long) section->sh_offset == section->sh_offset) in process_section_headers() 3633 print_vma (section->sh_offset, LONG_HEX); in process_section_headers() 3670 if ((long) section->sh_offset == section->sh_offset) in process_section_headers() 3675 print_vma (section->sh_offset, LONG_HEX); in process_section_headers() 3786 rel_offset = section->sh_offset; in process_relocs() 3823 strtab = get_data (NULL, file, strsec->sh_offset, in process_relocs() [all …]
|
/openbsd/lib/libc/gen/ |
H A D | nlist.c | 142 symoff = shdr[i].sh_offset; in __fdnlist() 144 symstroff = shdr[shdr[i].sh_link].sh_offset; in __fdnlist()
|
/openbsd/usr.sbin/installboot/ |
H A D | i386_nlist.c | 150 symoff = shdr[i].sh_offset; in __elf_fdnlist() 152 symstroff = shdr[shdr[i].sh_link].sh_offset; in __elf_fdnlist()
|
/openbsd/usr.sbin/vmd/ |
H A D | loadfile_elf.c | 799 if (gzseek(fp, (off_t)shp[elf->e_shstrndx].sh_offset, in elf64_exec() 828 if (gzseek(fp, (off_t)shp[i].sh_offset, in elf64_exec() 843 shp[i].sh_offset = off; in elf64_exec() 1017 if (gzseek(fp, (off_t)shp[elf->e_shstrndx].sh_offset, in elf32_exec() 1045 if (gzseek(fp, (off_t)shp[i].sh_offset, in elf32_exec() 1060 shp[i].sh_offset = off; in elf32_exec()
|
/openbsd/sys/arch/octeon/dev/ |
H A D | octboot.c | 239 sh[eh.e_shstrndx].sh_offset); in octboot_kexec() 258 sh[i].sh_size, sh[i].sh_offset); in octboot_kexec() 262 sh[i].sh_offset = off; in octboot_kexec()
|