Home
last modified time | relevance | path

Searched refs:phdr (Results 1 – 25 of 68) sorted by relevance

123

/linux/drivers/soc/qcom/
A Dmdt_loader.c28 if (!phdr->p_memsz) in mdt_phdr_valid()
61 if (phdr->p_paddr + phdr->p_memsz > max_addr) in qcom_mdt_get_size()
62 max_addr = ALIGN(phdr->p_paddr + phdr->p_memsz, SZ_4K); in qcom_mdt_get_size()
197 if (phdr->p_paddr + phdr->p_memsz > max_addr) in __qcom_mdt_load()
198 max_addr = ALIGN(phdr->p_paddr + phdr->p_memsz, SZ_4K); in __qcom_mdt_load()
239 if (phdr->p_filesz > phdr->p_memsz) { in __qcom_mdt_load()
249 if (phdr->p_filesz && phdr->p_offset < fw->size) { in __qcom_mdt_load()
251 if (phdr->p_offset + phdr->p_filesz > fw->size) { in __qcom_mdt_load()
258 memcpy(ptr, fw->data + phdr->p_offset, phdr->p_filesz); in __qcom_mdt_load()
282 if (phdr->p_memsz > phdr->p_filesz) in __qcom_mdt_load()
[all …]
A Dsmem.c282 void *p = phdr; in phdr_to_last_uncached_entry()
291 void *p = phdr; in phdr_to_first_cached_entry()
300 void *p = phdr; in phdr_to_last_cached_entry()
308 void *p = phdr; in phdr_to_first_uncached_entry()
310 return p + sizeof(*phdr); in phdr_to_first_uncached_entry()
396 le16_to_cpu(phdr->host0), le16_to_cpu(phdr->host1)); in qcom_smem_alloc_private()
468 phdr = __smem->partitions[host]; in qcom_smem_alloc()
471 phdr = __smem->global_partition; in qcom_smem_alloc()
563 le16_to_cpu(phdr->host0), le16_to_cpu(phdr->host1)); in qcom_smem_get_private()
598 phdr = __smem->partitions[host]; in qcom_smem_get()
[all …]
/linux/fs/
A Dbinfmt_elf_fdpic.c161 phdr = params->phdrs; in elf_fdpic_fetch_phdrs()
816 phdr->p_offset + phdr->p_filesz < stop) in elf_fdpic_map_file()
822 phdr->p_vaddr + phdr->p_filesz <= in elf_fdpic_map_file()
843 phdr->p_vaddr + phdr->p_memsz <= in elf_fdpic_map_file()
946 if (top < phdr->p_vaddr + phdr->p_memsz) in elf_fdpic_map_file_constdisp_on_uclinux()
947 top = phdr->p_vaddr + phdr->p_memsz; in elf_fdpic_map_file_constdisp_on_uclinux()
979 if (phdr->p_filesz < phdr->p_memsz) { in elf_fdpic_map_file_constdisp_on_uclinux()
981 phdr->p_memsz - phdr->p_filesz)) in elf_fdpic_map_file_constdisp_on_uclinux()
1121 excess = phdr->p_memsz - phdr->p_filesz; in elf_fdpic_map_file_by_direct_mmap()
1266 phdr->p_vaddr = 0; in fill_elf_note_phdr()
[all …]
/linux/arch/s390/kernel/
A Dkexec_elf.c21 const Elf_Phdr *phdr; in kexec_file_add_kernel_elf() local
34 phdr = (void *)ehdr + ehdr->e_phoff; in kexec_file_add_kernel_elf()
36 if (phdr->p_type != PT_LOAD) in kexec_file_add_kernel_elf()
40 buf.bufsz = phdr->p_filesz; in kexec_file_add_kernel_elf()
42 buf.mem = ALIGN(phdr->p_paddr, phdr->p_align); in kexec_file_add_kernel_elf()
45 buf.memsz = phdr->p_memsz; in kexec_file_add_kernel_elf()
48 if (entry - phdr->p_paddr < phdr->p_memsz) { in kexec_file_add_kernel_elf()
72 const Elf_Phdr *phdr; in s390_elf_load() local
95 if (phdr->p_type == PT_INTERP) in s390_elf_load()
98 if (phdr->p_offset > kernel_len) in s390_elf_load()
[all …]
A Dcrash_dump.c566 phdr->p_filesz = end - start; in loads_init()
567 phdr->p_type = PT_LOAD; in loads_init()
568 phdr->p_offset = start; in loads_init()
569 phdr->p_vaddr = start; in loads_init()
570 phdr->p_paddr = start; in loads_init()
571 phdr->p_memsz = end - start; in loads_init()
573 phdr->p_align = PAGE_SIZE; in loads_init()
574 phdr++; in loads_init()
595 memset(phdr, 0, sizeof(*phdr)); in notes_init()
596 phdr->p_type = PT_NOTE; in notes_init()
[all …]
/linux/kernel/
A Dkexec_elf.c188 if (phdr->p_offset + phdr->p_filesz < phdr->p_offset) { in elf_is_phdr_sane()
191 } else if (phdr->p_offset + phdr->p_filesz > buf_len) { in elf_is_phdr_sane()
194 } else if (phdr->p_paddr + phdr->p_memsz < phdr->p_paddr) { in elf_is_phdr_sane()
401 const struct elf_phdr *phdr; in kexec_elf_load() local
403 phdr = &elf_info->proghdrs[i]; in kexec_elf_load()
404 if (phdr->p_type != PT_LOAD) in kexec_elf_load()
407 size = phdr->p_filesz; in kexec_elf_load()
408 if (size > phdr->p_memsz) in kexec_elf_load()
409 size = phdr->p_memsz; in kexec_elf_load()
413 kbuf->memsz = phdr->p_memsz; in kexec_elf_load()
[all …]
A Dkexec_file.c1313 phdr->p_offset = phdr->p_paddr = notes_addr; in crash_prepare_elf64_headers()
1314 phdr->p_filesz = phdr->p_memsz = sizeof(note_buf_t); in crash_prepare_elf64_headers()
1316 phdr++; in crash_prepare_elf64_headers()
1322 phdr->p_filesz = phdr->p_memsz = VMCOREINFO_NOTE_SIZE; in crash_prepare_elf64_headers()
1324 phdr++; in crash_prepare_elf64_headers()
1331 phdr->p_filesz = phdr->p_memsz = _end - _text; in crash_prepare_elf64_headers()
1332 phdr->p_offset = phdr->p_paddr = __pa_symbol(_text); in crash_prepare_elf64_headers()
1334 phdr++; in crash_prepare_elf64_headers()
1348 phdr->p_filesz = phdr->p_memsz = mend - mstart + 1; in crash_prepare_elf64_headers()
1352 phdr, phdr->p_vaddr, phdr->p_paddr, phdr->p_filesz, in crash_prepare_elf64_headers()
[all …]
/linux/arch/ia64/kernel/
A Delfcore.c23 struct elf_phdr phdr = gate_phdrs[i]; in elf_core_write_extra_phdrs() local
25 if (phdr.p_type == PT_LOAD) { in elf_core_write_extra_phdrs()
26 phdr.p_memsz = PAGE_ALIGN(phdr.p_memsz); in elf_core_write_extra_phdrs()
27 phdr.p_filesz = phdr.p_memsz; in elf_core_write_extra_phdrs()
29 ofs = phdr.p_offset = offset; in elf_core_write_extra_phdrs()
30 offset += phdr.p_filesz; in elf_core_write_extra_phdrs()
32 phdr.p_offset = ofs; in elf_core_write_extra_phdrs()
35 phdr.p_offset += ofs; in elf_core_write_extra_phdrs()
37 phdr.p_paddr = 0; /* match other core phdrs */ in elf_core_write_extra_phdrs()
38 if (!dump_emit(cprm, &phdr, sizeof(phdr))) in elf_core_write_extra_phdrs()
/linux/tools/testing/selftests/kvm/lib/
A Delf.c148 Elf64_Phdr phdr; in kvm_vm_elf_load() local
149 test_read(fd, &phdr, sizeof(phdr)); in kvm_vm_elf_load()
152 if (phdr.p_type != PT_LOAD) in kvm_vm_elf_load()
159 n1, (uint64_t) phdr.p_memsz); in kvm_vm_elf_load()
161 vm_vaddr_t seg_vend = phdr.p_vaddr + phdr.p_memsz - 1; in kvm_vm_elf_load()
180 if (phdr.p_filesz) { in kvm_vm_elf_load()
181 offset_rv = lseek(fd, phdr.p_offset, SEEK_SET); in kvm_vm_elf_load()
182 TEST_ASSERT(offset_rv == phdr.p_offset, in kvm_vm_elf_load()
188 (intmax_t) phdr.p_offset); in kvm_vm_elf_load()
189 test_read(fd, addr_gva2hva(vm, phdr.p_vaddr), in kvm_vm_elf_load()
[all …]
/linux/tools/perf/util/
A Dsymbol-minimal.c117 Elf32_Phdr *phdr; in filename__read_build_id() local
137 for (i = 0, phdr = buf; i < ehdr.e_phnum; i++, phdr++) { in filename__read_build_id()
142 phdr->p_type = bswap_32(phdr->p_type); in filename__read_build_id()
143 phdr->p_offset = bswap_32(phdr->p_offset); in filename__read_build_id()
144 phdr->p_filesz = bswap_32(phdr->p_filesz); in filename__read_build_id()
151 offset = phdr->p_offset; in filename__read_build_id()
168 Elf64_Phdr *phdr; in filename__read_build_id() local
188 for (i = 0, phdr = buf; i < ehdr.e_phnum; i++, phdr++) { in filename__read_build_id()
193 phdr->p_type = bswap_32(phdr->p_type); in filename__read_build_id()
194 phdr->p_offset = bswap_64(phdr->p_offset); in filename__read_build_id()
[all …]
/linux/fs/proc/
A Dvmcore.c901 phdr.p_vaddr = phdr.p_paddr = 0; in merge_note_headers_elf64()
902 phdr.p_filesz = phdr.p_memsz = phdr_sz; in merge_note_headers_elf64()
907 memcpy(tmp, &phdr, sizeof(phdr)); in merge_note_headers_elf64()
1092 phdr.p_vaddr = phdr.p_paddr = 0; in merge_note_headers_elf32()
1093 phdr.p_filesz = phdr.p_memsz = phdr_sz; in merge_note_headers_elf32()
1098 memcpy(tmp, &phdr, sizeof(phdr)); in merge_note_headers_elf32()
1429 phdr->p_filesz = phdr->p_memsz; in vmcoredd_update_program_headers()
1434 end = roundup(phdr->p_offset + phdr->p_memsz, in vmcoredd_update_program_headers()
1437 phdr->p_offset = vmcore_off + (phdr->p_offset - start); in vmcoredd_update_program_headers()
1449 phdr->p_filesz = phdr->p_memsz; in vmcoredd_update_program_headers()
[all …]
/linux/arch/x86/um/
A Delfcore.c26 struct elf_phdr phdr = phdrp[i]; in elf_core_write_extra_phdrs() local
28 if (phdr.p_type == PT_LOAD) { in elf_core_write_extra_phdrs()
29 ofs = phdr.p_offset = offset; in elf_core_write_extra_phdrs()
30 offset += phdr.p_filesz; in elf_core_write_extra_phdrs()
32 phdr.p_offset += ofs; in elf_core_write_extra_phdrs()
34 phdr.p_paddr = 0; /* match other core phdrs */ in elf_core_write_extra_phdrs()
35 if (!dump_emit(cprm, &phdr, sizeof(phdr))) in elf_core_write_extra_phdrs()
/linux/drivers/media/usb/siano/
A Dsmsusb.c102 surb->cb->size = phdr->msg_length; in smsusb_onresponse()
109 ((phdr->msg_flags >> 8) & 3); in smsusb_onresponse()
112 if (((int) phdr->msg_length + in smsusb_onresponse()
115 phdr->msg_length, in smsusb_onresponse()
130 phdr->msg_type, phdr->msg_length); in smsusb_onresponse()
209 struct sms_msg_hdr *phdr; in smsusb_sendrequest() local
218 if (!phdr) in smsusb_sendrequest()
222 smscore_translate_msg(phdr->msg_type), phdr->msg_type, in smsusb_sendrequest()
223 phdr->msg_length); in smsusb_sendrequest()
228 phdr, size, &dummy, 1000); in smsusb_sendrequest()
[all …]
/linux/lib/
A Dbuildid.c73 Elf32_Phdr *phdr; in get_build_id_32() local
81 phdr = (Elf32_Phdr *)(page_addr + sizeof(Elf32_Ehdr)); in get_build_id_32()
84 if (phdr[i].p_type == PT_NOTE && in get_build_id_32()
86 page_addr + phdr[i].p_offset, in get_build_id_32()
87 phdr[i].p_filesz)) in get_build_id_32()
98 Elf64_Phdr *phdr; in get_build_id_64() local
106 phdr = (Elf64_Phdr *)(page_addr + sizeof(Elf64_Ehdr)); in get_build_id_64()
109 if (phdr[i].p_type == PT_NOTE && in get_build_id_64()
111 page_addr + phdr[i].p_offset, in get_build_id_64()
112 phdr[i].p_filesz)) in get_build_id_64()
/linux/tools/testing/selftests/sgx/
A Dload.c182 Elf64_Phdr *phdr = &phdr_tbl[i]; in encl_load() local
184 if (phdr->p_type == PT_LOAD) in encl_load()
194 Elf64_Phdr *phdr = &phdr_tbl[i]; in encl_load() local
195 unsigned int flags = phdr->p_flags; in encl_load()
198 if (phdr->p_type != PT_LOAD) in encl_load()
206 phdr->p_flags); in encl_load()
213 phdr->p_flags); in encl_load()
218 src_offset = phdr->p_offset & PAGE_MASK; in encl_load()
223 seg->prot = (phdr->p_flags & PF_R) ? PROT_READ : 0; in encl_load()
224 seg->prot |= (phdr->p_flags & PF_W) ? PROT_WRITE : 0; in encl_load()
[all …]
/linux/drivers/media/common/siano/
A Dsmsendian.c85 struct sms_msg_hdr *phdr = (struct sms_msg_hdr *)msg; in smsendian_handle_message_header() local
87 phdr->msg_type = le16_to_cpu((__force __le16)phdr->msg_type); in smsendian_handle_message_header()
88 phdr->msg_length = le16_to_cpu((__force __le16)phdr->msg_length); in smsendian_handle_message_header()
89 phdr->msg_flags = le16_to_cpu((__force __le16)phdr->msg_flags); in smsendian_handle_message_header()
/linux/arch/powerpc/kernel/
A Dfadump.c766 phdr->p_offset = phdr->p_paddr; in fadump_update_elfcore_header()
1077 phdr->p_flags = 0; in fadump_create_elfcore_headers()
1078 phdr->p_vaddr = 0; in fadump_create_elfcore_headers()
1079 phdr->p_align = 0; in fadump_create_elfcore_headers()
1082 phdr->p_paddr = 0; in fadump_create_elfcore_headers()
1084 phdr->p_memsz = 0; in fadump_create_elfcore_headers()
1092 phdr->p_flags = 0; in fadump_create_elfcore_headers()
1093 phdr->p_vaddr = 0; in fadump_create_elfcore_headers()
1094 phdr->p_align = 0; in fadump_create_elfcore_headers()
1097 phdr->p_offset = phdr->p_paddr; in fadump_create_elfcore_headers()
[all …]
/linux/drivers/remoteproc/
A Dremoteproc_elf_helpers.h70 ELF_GEN_FIELD_GET_SET(phdr, p_paddr, u64) in ELF_GEN_FIELD_GET_SET()
71 ELF_GEN_FIELD_GET_SET(phdr, p_vaddr, u64) in ELF_GEN_FIELD_GET_SET()
72 ELF_GEN_FIELD_GET_SET(phdr, p_filesz, u64) in ELF_GEN_FIELD_GET_SET()
73 ELF_GEN_FIELD_GET_SET(phdr, p_memsz, u64) in ELF_GEN_FIELD_GET_SET()
74 ELF_GEN_FIELD_GET_SET(phdr, p_type, u32) in ELF_GEN_FIELD_GET_SET()
75 ELF_GEN_FIELD_GET_SET(phdr, p_offset, u64) in ELF_GEN_FIELD_GET_SET()
76 ELF_GEN_FIELD_GET_SET(phdr, p_flags, u32) in ELF_GEN_FIELD_GET_SET()
77 ELF_GEN_FIELD_GET_SET(phdr, p_align, u64) in ELF_GEN_FIELD_GET_SET()
97 ELF_STRUCT_SIZE(phdr)
A Dremoteproc_coredump.c237 void *phdr; in rproc_coredump() local
289 phdr = data + elf_hdr_get_e_phoff(class, ehdr); in rproc_coredump()
294 memset(phdr, 0, elf_size_of_phdr(class)); in rproc_coredump()
295 elf_phdr_set_p_type(class, phdr, PT_LOAD); in rproc_coredump()
296 elf_phdr_set_p_offset(class, phdr, offset); in rproc_coredump()
297 elf_phdr_set_p_vaddr(class, phdr, segment->da); in rproc_coredump()
298 elf_phdr_set_p_paddr(class, phdr, segment->da); in rproc_coredump()
300 elf_phdr_set_p_memsz(class, phdr, segment->size); in rproc_coredump()
302 elf_phdr_set_p_align(class, phdr, 0); in rproc_coredump()
308 offset += elf_phdr_get_p_filesz(class, phdr); in rproc_coredump()
[all …]
A Dqcom_q6v5_mss.c1300 phdr = &phdrs[i]; in q6v5_mpss_load()
1311 if (phdr->p_paddr + phdr->p_memsz > max_addr) in q6v5_mpss_load()
1312 max_addr = ALIGN(phdr->p_paddr + phdr->p_memsz, SZ_4K); in q6v5_mpss_load()
1336 phdr = &phdrs[i]; in q6v5_mpss_load()
1348 if (phdr->p_filesz > phdr->p_memsz) { in q6v5_mpss_load()
1364 if (phdr->p_filesz && phdr->p_offset < fw->size) { in q6v5_mpss_load()
1366 if (phdr->p_offset + phdr->p_filesz > fw->size) { in q6v5_mpss_load()
1375 memcpy(ptr, fw->data + phdr->p_offset, phdr->p_filesz); in q6v5_mpss_load()
1400 if (phdr->p_memsz > phdr->p_filesz) { in q6v5_mpss_load()
1402 phdr->p_memsz - phdr->p_filesz); in q6v5_mpss_load()
[all …]
/linux/arch/powerpc/platforms/powernv/
A Dopal-core.c307 Elf64_Phdr *phdr; in create_opalcore() local
378 phdr = (Elf64_Phdr *)bufp; in create_opalcore()
380 phdr->p_type = cpu_to_be32(PT_NOTE); in create_opalcore()
381 phdr->p_flags = 0; in create_opalcore()
382 phdr->p_align = 0; in create_opalcore()
383 phdr->p_paddr = phdr->p_vaddr = 0; in create_opalcore()
385 phdr->p_filesz = phdr->p_memsz = cpu_to_be64(cpu_notes_size); in create_opalcore()
392 phdr = (Elf64_Phdr *)bufp; in create_opalcore()
396 phdr->p_align = 0; in create_opalcore()
406 phdr->p_paddr = cpu_to_be64(paddr); in create_opalcore()
[all …]
/linux/net/dsa/
A Dtag_qca.c34 __be16 *phdr; in qca_tag_xmit() local
40 phdr = dsa_etype_header_pos_tx(skb); in qca_tag_xmit()
46 *phdr = htons(hdr); in qca_tag_xmit()
56 __be16 *phdr; in qca_tag_rcv() local
61 phdr = dsa_etype_header_pos_rx(skb); in qca_tag_rcv()
62 hdr = ntohs(*phdr); in qca_tag_rcv()
/linux/tools/testing/selftests/powerpc/ptrace/
A Dcore-pkey.c199 Elf64_Phdr *phdr; in check_core_file() local
216 phdr_size = sizeof(*phdr) * ehdr->e_phnum; in check_core_file()
223 for (phdr = p + ehdr->e_phoff; in check_core_file()
224 (void *) phdr < p + ehdr->e_phoff + phdr_size; in check_core_file()
225 phdr += ehdr->e_phentsize) in check_core_file()
226 if (phdr->p_type == PT_NOTE) in check_core_file()
229 FAIL_IF((void *) phdr >= p + ehdr->e_phoff + phdr_size); in check_core_file()
232 for (nhdr = p + phdr->p_offset; in check_core_file()
233 (void *) nhdr < p + phdr->p_offset + phdr->p_filesz; in check_core_file()
238 FAIL_IF((void *) nhdr >= p + phdr->p_offset + phdr->p_filesz); in check_core_file()
/linux/drivers/media/platform/sti/c8sectpfe/
A Dc8sectpfe-core.c1037 seg_num, phdr->p_paddr, phdr->p_filesz, dest, in load_imem_segment()
1038 phdr->p_memsz + phdr->p_memsz / 3); in load_imem_segment()
1040 for (i = 0; i < phdr->p_filesz; i++) { in load_imem_segment()
1066 seg_num, phdr->p_paddr, phdr->p_filesz, in load_dmem_segment()
1067 dst, phdr->p_memsz); in load_dmem_segment()
1070 phdr->p_filesz); in load_dmem_segment()
1073 phdr->p_memsz - phdr->p_filesz); in load_dmem_segment()
1079 Elf32_Phdr *phdr; in load_slim_core_fw() local
1093 if (phdr->p_type != PT_LOAD) in load_slim_core_fw()
1099 if (phdr->p_offset + phdr->p_filesz > fw->size) { in load_slim_core_fw()
[all …]
/linux/arch/x86/boot/compressed/
A Dmisc.c278 Elf64_Phdr *phdrs, *phdr; in parse_elf() local
281 Elf32_Phdr *phdrs, *phdr; in parse_elf()
304 phdr = &phdrs[i]; in parse_elf()
306 switch (phdr->p_type) { in parse_elf()
309 if ((phdr->p_align % 0x200000) != 0) in parse_elf()
314 dest += (phdr->p_paddr - LOAD_PHYSICAL_ADDR); in parse_elf()
316 dest = (void *)(phdr->p_paddr); in parse_elf()
318 memmove(dest, output + phdr->p_offset, phdr->p_filesz); in parse_elf()

Completed in 49 milliseconds

123