Home
last modified time | relevance | path

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

/arch/s390/kernel/
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()
35 for (i = 0; i < ehdr->e_phnum; i++, phdr++) { in kexec_file_add_kernel_elf()
36 if (phdr->p_type != PT_LOAD) in kexec_file_add_kernel_elf()
39 buf.buffer = kernel + phdr->p_offset; 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()
46 data->memsz = ALIGN(data->memsz, phdr->p_align) + buf.memsz; in kexec_file_add_kernel_elf()
48 if (entry - phdr->p_paddr < phdr->p_memsz) { in kexec_file_add_kernel_elf()
[all …]
Dcrash_dump.c561 static void loads_init(Elf64_Phdr *phdr, u64 loads_offset) in loads_init() argument
568 phdr->p_filesz = end - start; in loads_init()
569 phdr->p_type = PT_LOAD; in loads_init()
570 phdr->p_offset = start; in loads_init()
571 phdr->p_vaddr = start; in loads_init()
572 phdr->p_paddr = start; in loads_init()
573 phdr->p_memsz = end - start; in loads_init()
574 phdr->p_flags = PF_R | PF_W | PF_X; in loads_init()
575 phdr->p_align = PAGE_SIZE; in loads_init()
576 phdr++; in loads_init()
[all …]
/arch/ia64/kernel/
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()
Dunwind.c2193 Elf64_Phdr *punw = NULL, *phdr = (Elf64_Phdr *) (GATE_ADDR + GATE_EHDR->e_phoff); in create_gate_table() local
2196 for (i = 0; i < GATE_EHDR->e_phnum; ++i, ++phdr) in create_gate_table()
2197 if (phdr->p_type == PT_IA_64_UNWIND) { in create_gate_table()
2198 punw = phdr; in create_gate_table()
/arch/x86/um/
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()
/arch/powerpc/kernel/
Dfadump.c658 struct elf_phdr *phdr; in fadump_update_elfcore_header() local
664 phdr = (struct elf_phdr *)bufp; in fadump_update_elfcore_header()
666 if (phdr->p_type == PT_NOTE) { in fadump_update_elfcore_header()
667 phdr->p_paddr = __pa(fw_dump.cpu_notes_buf_vaddr); in fadump_update_elfcore_header()
668 phdr->p_offset = phdr->p_paddr; in fadump_update_elfcore_header()
669 phdr->p_filesz = fw_dump.cpu_notes_buf_size; in fadump_update_elfcore_header()
670 phdr->p_memsz = fw_dump.cpu_notes_buf_size; in fadump_update_elfcore_header()
955 struct elf_phdr *phdr; in fadump_create_elfcore_headers() local
970 phdr = (struct elf_phdr *)bufp; in fadump_create_elfcore_headers()
972 phdr->p_type = PT_NOTE; in fadump_create_elfcore_headers()
[all …]
Dprom_init.c1078 Elf32_Phdr phdr[2]; member
1116 .e_phoff = offsetof(struct fake_elf, phdr),
1120 .phdr = {
/arch/powerpc/platforms/powernv/
Dopal-core.c306 Elf64_Phdr *phdr; in create_opalcore() local
377 phdr = (Elf64_Phdr *)bufp; in create_opalcore()
379 phdr->p_type = cpu_to_be32(PT_NOTE); in create_opalcore()
380 phdr->p_flags = 0; in create_opalcore()
381 phdr->p_align = 0; in create_opalcore()
382 phdr->p_paddr = phdr->p_vaddr = 0; in create_opalcore()
383 phdr->p_offset = cpu_to_be64(hdr_size); in create_opalcore()
384 phdr->p_filesz = phdr->p_memsz = cpu_to_be64(cpu_notes_size); in create_opalcore()
391 phdr = (Elf64_Phdr *)bufp; in create_opalcore()
393 phdr->p_type = cpu_to_be32(PT_LOAD); in create_opalcore()
[all …]
/arch/powerpc/oprofile/cell/
Dvma_map.c113 Elf32_Phdr phdr; in create_vma_map() local
154 if (copy_from_user(&phdr, phdr_start + i, sizeof(phdr))) in create_vma_map()
157 if (phdr.p_type != PT_LOAD) in create_vma_map()
159 if (phdr.p_flags & (1 << 27)) in create_vma_map()
162 map = vma_map_add(map, phdr.p_vaddr, phdr.p_memsz, in create_vma_map()
163 phdr.p_offset, 0, 0); in create_vma_map()
/arch/x86/boot/compressed/
Dmisc.c274 Elf64_Phdr *phdrs, *phdr; in parse_elf() local
277 Elf32_Phdr *phdrs, *phdr; in parse_elf()
300 phdr = &phdrs[i]; in parse_elf()
302 switch (phdr->p_type) { in parse_elf()
305 if ((phdr->p_align % 0x200000) != 0) in parse_elf()
310 dest += (phdr->p_paddr - LOAD_PHYSICAL_ADDR); in parse_elf()
312 dest = (void *)(phdr->p_paddr); in parse_elf()
314 memmove(dest, output + phdr->p_offset, phdr->p_filesz); in parse_elf()
/arch/parisc/boot/compressed/
Dmisc.c237 Elf64_Phdr *phdrs, *phdr; in parse_elf() local
240 Elf32_Phdr *phdrs, *phdr; in parse_elf()
265 phdr = &phdrs[i]; in parse_elf()
267 switch (phdr->p_type) { in parse_elf()
269 dest = (void *)((unsigned long) phdr->p_paddr & in parse_elf()
271 memmove(dest, output + phdr->p_offset, phdr->p_filesz); in parse_elf()
/arch/x86/kernel/
Dcrash.c250 Elf64_Phdr *phdr; in prepare_elf_headers() local
278 phdr = (Elf64_Phdr *)(ehdr + 1); in prepare_elf_headers()
279 for (i = 0; i < ehdr->e_phnum; phdr++, i++) in prepare_elf_headers()
280 if (phdr->p_type == PT_LOAD && in prepare_elf_headers()
281 phdr->p_paddr == image->arch.backup_src_start && in prepare_elf_headers()
282 phdr->p_memsz == image->arch.backup_src_sz) { in prepare_elf_headers()
283 phdr->p_offset = image->arch.backup_load_addr; in prepare_elf_headers()
/arch/s390/include/asm/
Delf.h170 #define arch_elf_pt_proc(ehdr, phdr, elf, interp, state) \ argument
173 if ((phdr)->p_type == PT_S390_PGSTE && \
185 #define arch_elf_pt_proc(ehdr, phdr, elf, interp, state) \ argument
/arch/mips/kernel/
Dvpe.c698 struct elf_phdr *phdr = (struct elf_phdr *) in vpe_elfload() local
702 if (phdr->p_type == PT_LOAD) { in vpe_elfload()
703 memcpy((void *)phdr->p_paddr, in vpe_elfload()
704 (char *)hdr + phdr->p_offset, in vpe_elfload()
705 phdr->p_filesz); in vpe_elfload()
706 memset((void *)phdr->p_paddr + phdr->p_filesz, in vpe_elfload()
707 0, phdr->p_memsz - phdr->p_filesz); in vpe_elfload()
709 phdr++; in vpe_elfload()
/arch/x86/kernel/cpu/microcode/
Dintel.c366 struct microcode_header_intel *phdr = &patch->hdr; in scan_microcode() local
369 phdr->sig, in scan_microcode()
370 phdr->pf, in scan_microcode()
371 phdr->rev)) in scan_microcode()
726 struct microcode_header_intel *phdr; in find_patch() local
731 phdr = (struct microcode_header_intel *)iter->data; in find_patch()
733 if (phdr->rev <= uci->cpu_sig.rev) in find_patch()
736 if (!find_matching_signature(phdr, in find_patch()
/arch/mips/include/asm/
Delf.h502 extern int arch_elf_pt_proc(void *ehdr, void *phdr, struct file *elf,