Home
last modified time | relevance | path

Searched refs:e_phoff (Results 1 – 25 of 43) sorted by relevance

12

/linux-6.15/kernel/
H A Dkexec_elf.c78 if (ehdr->e_phoff > 0 && ehdr->e_phnum > 0) { in elf_is_ehdr_sane()
88 if (ehdr->e_phoff + phdr_size < ehdr->e_phoff) { in elf_is_ehdr_sane()
91 } else if (ehdr->e_phoff + phdr_size > buf_len) { in elf_is_ehdr_sane()
163 ehdr->e_phoff = elf64_to_cpu(ehdr, buf_ehdr->e_phoff); in elf_read_ehdr()
169 ehdr->e_phoff = elf32_to_cpu(ehdr, buf_ehdr->e_phoff); in elf_read_ehdr()
212 pbuf = buf + elf_info->ehdr->e_phoff + (idx * sizeof(*buf_phdr)); in elf_read_phdr()
308 if (ehdr->e_phoff > 0 && ehdr->e_phnum > 0) { in elf_read_from_buffer()
/linux-6.15/arch/x86/um/
H A Delfcore.c22 (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); in elf_core_write_extra_phdrs()
49 (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); in elf_core_write_extra_data()
70 (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); in elf_core_extra_data_size()
/linux-6.15/tools/testing/selftests/powerpc/ptrace/
H A Dcore-pkey.c181 FAIL_IF(ehdr->e_phoff == 0 || ehdr->e_phnum == 0); in check_core_file()
190 FAIL_IF(ehdr->e_phoff + phdr_size < ehdr->e_phoff); in check_core_file()
191 FAIL_IF(ehdr->e_phoff + phdr_size > core_size); in check_core_file()
194 for (phdr = p + ehdr->e_phoff; in check_core_file()
195 (void *) phdr < p + ehdr->e_phoff + phdr_size; in check_core_file()
200 FAIL_IF((void *) phdr >= p + ehdr->e_phoff + phdr_size); in check_core_file()
/linux-6.15/tools/perf/util/
H A Dsymbol-minimal.c123 ehdr.e_phoff = bswap_32(ehdr.e_phoff); in filename__read_build_id()
133 fseek(fp, ehdr.e_phoff, SEEK_SET); in filename__read_build_id()
175 ehdr.e_phoff = bswap_64(ehdr.e_phoff); in filename__read_build_id()
185 fseek(fp, ehdr.e_phoff, SEEK_SET); in filename__read_build_id()
/linux-6.15/arch/s390/kernel/
H A Dkexec_elf.c34 phdr = (void *)ehdr + ehdr->e_phoff; in kexec_file_add_kernel_elf()
89 size = ehdr->e_ehsize + ehdr->e_phoff; in s390_elf_load()
94 phdr = (void *)ehdr + ehdr->e_phoff; in s390_elf_load()
/linux-6.15/Documentation/userspace-api/
H A DELF.rst11 e_phoff.
14 e_phoff + (e_phnum - 1) * sizeof(Elf_Phdr).
/linux-6.15/arch/powerpc/boot/
H A Delf_util.c36 (unsigned long)elf64->e_phoff); in parse_elf64()
67 elf32ph = (Elf32_Phdr *) ((unsigned long)elf32 + elf32->e_phoff); in parse_elf32()
H A Delf.h61 Elf32_Off e_phoff; member
78 Elf64_Off e_phoff; /* Program header table file offset */ member
/linux-6.15/sound/pci/mixart/
H A Dmixart_hwdep.c68 __be32 e_phoff; member
101 if( elf_header->e_phoff != 0 ) { in mixart_load_elf()
105 u32 pos = be32_to_cpu(elf_header->e_phoff) + (u32)(i * be16_to_cpu(elf_header->e_phentsize)); in mixart_load_elf()
/linux-6.15/tools/include/uapi/linux/
H A Delf.h223 Elf32_Off e_phoff; member
240 Elf64_Off e_phoff; /* Program header table file offset */ member
/linux-6.15/lib/
H A Dbuildid.c226 phoff = READ_ONCE(ehdr->e_phoff); in get_build_id_32()
263 phoff = READ_ONCE(ehdr->e_phoff); in get_build_id_64()
/linux-6.15/include/uapi/linux/
H A Delf.h223 Elf32_Off e_phoff; member
240 Elf64_Off e_phoff; /* Program header table file offset */ member
/linux-6.15/tools/testing/selftests/kvm/lib/
H A Delf.c139 offset = hdr.e_phoff + (n1 * hdr.e_phentsize); in kvm_vm_elf_load()
/linux-6.15/arch/mips/boot/
H A Delf2ecoff.c175 e->e_phoff = swab32(e->e_phoff); in convert_elf_hdr()
329 ph = (Elf32_Phdr *) saveRead(infile, ex.e_phoff, in main()
/linux-6.15/drivers/remoteproc/
H A Dremoteproc_elf_helpers.h60 ELF_GEN_FIELD_GET_SET(hdr, e_phoff, u64) in ELF_GEN_FIELD_GET_SET()
/linux-6.15/arch/s390/tools/
H A Drelocs.c136 ehdr.e_phoff = elf_off_to_cpu(ehdr.e_phoff); in read_ehdr()
/linux-6.15/arch/sparc/vdso/
H A Dvdso2c.h25 ELF(Phdr) *pt = (ELF(Phdr) *)(raw_addr + GET_BE(&hdr->e_phoff)); in BITSFUNC()
/linux-6.15/tools/testing/selftests/proc/
H A Dproc-pid-vm.c87 uint64_t e_phoff; member
177 h.e_phoff = sizeof(struct elf64_hdr); in make_exe()
/linux-6.15/fs/
H A Dbinfmt_elf.c537 retval = elf_read(elf_file, elf_phdata, size, elf_ex->e_phoff); in load_elf_phdrs()
1201 if (elf_ppnt->p_offset <= elf_ex->e_phoff && in load_elf_binary()
1202 elf_ex->e_phoff < elf_ppnt->p_offset + elf_ppnt->p_filesz) { in load_elf_binary()
1203 phdr_addr = elf_ex->e_phoff - elf_ppnt->p_offset + in load_elf_binary()
1424 retval = elf_read(file, eppnt, j, elf_ex.e_phoff); in load_elf_library()
1510 elf->e_phoff = sizeof(struct elfhdr); in fill_elf_header()
H A Dbinfmt_elf_fdpic.c144 loff_t pos = params->hdr.e_phoff; in elf_fdpic_fetch_phdrs()
805 stop = params->hdr.e_phoff; in elf_fdpic_map_file()
813 if (phdr->p_offset > params->hdr.e_phoff || in elf_fdpic_map_file()
825 params->hdr.e_phoff - phdr->p_offset; in elf_fdpic_map_file()
1253 elf->e_phoff = sizeof(struct elfhdr); in fill_elf_fdpic_header()
/linux-6.15/arch/alpha/boot/tools/
H A Dobjstrip.c170 lseek(fd, elf->e_phoff, SEEK_SET); in main()
/linux-6.15/drivers/gpu/drm/imagination/
H A Dpvr_fw_mips.c38 struct elf32_phdr *program_header = (struct elf32_phdr *)(fw + header->e_phoff); in process_elf_command_stream()
/linux-6.15/arch/parisc/boot/compressed/
H A Dmisc.c262 memcpy(phdrs, output + ehdr.e_phoff, sizeof(*phdrs) * ehdr.e_phnum); in parse_elf()
/linux-6.15/arch/x86/entry/vdso/
H A Dvdso2c.h58 ELF(Phdr) *pt = (ELF(Phdr) *)(raw_addr + GET_LE(&hdr->e_phoff)); in BITSFUNC()
/linux-6.15/tools/testing/selftests/vDSO/
H A Dparse_vdso.c111 ELF(Phdr) *pt = (ELF(Phdr)*)(vdso_info.load_addr + hdr->e_phoff); in vdso_init_from_sysinfo_ehdr()

12