Home
last modified time | relevance | path

Searched refs:elf_phdr (Results 1 – 24 of 24) sorted by relevance

/openbmc/linux/arch/alpha/boot/tools/
H A Dobjstrip.c32 # define elf_phdr elf64_phdr macro
62 struct elf_phdr *elf_phdr; /* program header */ in main() local
171 if (read(fd, buf, sizeof(*elf_phdr)) != sizeof(*elf_phdr)) { in main()
176 elf_phdr = (struct elf_phdr *) buf; in main()
177 offset = elf_phdr->p_offset; in main()
178 mem_size = elf_phdr->p_memsz; in main()
179 fil_size = elf_phdr->p_filesz; in main()
182 if (elf_phdr->p_vaddr < e_entry) { in main()
183 unsigned long delta = e_entry - elf_phdr->p_vaddr; in main()
187 elf_phdr->p_vaddr += delta; in main()
[all …]
/openbmc/linux/arch/x86/um/
H A Delfcore.c20 const struct elf_phdr *const phdrp = in elf_core_write_extra_phdrs()
21 (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); in elf_core_write_extra_phdrs()
26 struct elf_phdr phdr = phdrp[i]; in elf_core_write_extra_phdrs()
47 const struct elf_phdr *const phdrp = in elf_core_write_extra_data()
48 (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); in elf_core_write_extra_data()
68 const struct elf_phdr *const phdrp = in elf_core_extra_data_size()
69 (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); in elf_core_extra_data_size()
/openbmc/linux/arch/ia64/kernel/
H A Delfcore.c17 const struct elf_phdr *const gate_phdrs = in elf_core_write_extra_phdrs()
18 (const struct elf_phdr *) (GATE_ADDR + GATE_EHDR->e_phoff); in elf_core_write_extra_phdrs()
23 struct elf_phdr phdr = gate_phdrs[i]; in elf_core_write_extra_phdrs()
46 const struct elf_phdr *const gate_phdrs = in elf_core_write_extra_data()
47 (const struct elf_phdr *) (GATE_ADDR + GATE_EHDR->e_phoff); in elf_core_write_extra_data()
65 const struct elf_phdr *const gate_phdrs = in elf_core_extra_data_size()
66 (const struct elf_phdr *) (GATE_ADDR + GATE_EHDR->e_phoff); in elf_core_extra_data_size()
/openbmc/linux/kernel/
H A Dkexec_elf.c65 if (ehdr->e_phnum > 0 && ehdr->e_phentsize != sizeof(struct elf_phdr)) { in elf_is_ehdr_sane()
85 phdr_size = sizeof(struct elf_phdr) * ehdr->e_phnum; in elf_is_ehdr_sane()
185 static bool elf_is_phdr_sane(const struct elf_phdr *phdr, size_t buf_len) in elf_is_phdr_sane()
207 struct elf_phdr *phdr = (struct elf_phdr *) &elf_info->proghdrs[idx]; in elf_read_phdr()
210 struct elf_phdr *buf_phdr; in elf_read_phdr()
213 buf_phdr = (struct elf_phdr *) pbuf; in elf_read_phdr()
261 phdr_size = sizeof(struct elf_phdr) * ehdr->e_phnum; in elf_read_phdrs()
401 const struct elf_phdr *phdr; in kexec_elf_load()
/openbmc/qemu/bsd-user/
H A Delfload.c39 static int load_elf_sections(const struct elfhdr *hdr, struct elf_phdr *phdr,
65 static void bswap_phdr(struct elf_phdr *phdr, int phnum) in bswap_phdr()
117 static void bswap_phdr(struct elf_phdr *phdr, int phnum) { } in bswap_phdr()
275 struct elf_phdr *elf_phdata = NULL; in load_elf_interp()
291 if (sizeof(struct elf_phdr) * interp_elf_ex->e_phnum > TARGET_PAGE_SIZE) { in load_elf_interp()
295 elf_phdata = (struct elf_phdr *) malloc(sizeof(struct elf_phdr) * in load_elf_interp()
306 if (interp_elf_ex->e_phentsize != sizeof(struct elf_phdr)) { in load_elf_interp()
314 sizeof(struct elf_phdr) * interp_elf_ex->e_phnum); in load_elf_interp()
529 load_elf_sections(const struct elfhdr *hdr, struct elf_phdr *phdr, int fd, in load_elf_sections()
532 struct elf_phdr *elf_ppnt; in load_elf_sections()
[all …]
/openbmc/linux/fs/
H A Dbinfmt_elf_test.c6 struct elf_phdr empty[] = { in total_mapping_size_test()
14 struct elf_phdr mount[] = { in total_mapping_size_test()
31 struct elf_phdr unordered[] = { in total_mapping_size_test()
H A Dbinfmt_elf.c264 NEW_AUX_ENT(AT_PHENT, sizeof(struct elf_phdr)); in create_elf_tables()
371 const struct elf_phdr *eppnt, int prot, int type, in elf_map()
409 static unsigned long total_mapping_size(const struct elf_phdr *phdr, int nr) in total_mapping_size()
437 static unsigned long maximum_alignment(struct elf_phdr *cmds, int nr) in maximum_alignment()
466 static struct elf_phdr *load_elf_phdrs(const struct elfhdr *elf_ex, in load_elf_phdrs()
469 struct elf_phdr *elf_phdata = NULL; in load_elf_phdrs()
477 if (elf_ex->e_phentsize != sizeof(struct elf_phdr)) in load_elf_phdrs()
482 size = sizeof(struct elf_phdr) * elf_ex->e_phnum; in load_elf_phdrs()
538 struct elf_phdr *phdr, in arch_elf_pt_proc()
593 unsigned long no_base, struct elf_phdr *interp_elf_phdata, in load_elf_interp()
[all …]
H A Dcompat_binfmt_elf.c29 #undef elf_phdr
35 #define elf_phdr elf32_phdr macro
H A Dbinfmt_elf_fdpic.c141 struct elf_phdr *phdr; in elf_fdpic_fetch_phdrs()
146 if (params->hdr.e_phentsize != sizeof(struct elf_phdr)) in elf_fdpic_fetch_phdrs()
148 if (params->hdr.e_phnum > 65536U / sizeof(struct elf_phdr)) in elf_fdpic_fetch_phdrs()
151 size = params->hdr.e_phnum * sizeof(struct elf_phdr); in elf_fdpic_fetch_phdrs()
186 struct elf_phdr *phdr; in load_elf_fdpic_binary()
649 NEW_AUX_ENT(AT_PHENT, sizeof(struct elf_phdr)); in create_elf_fdpic_tables()
748 struct elf_phdr *phdr; in elf_fdpic_map_file()
804 stop += params->hdr.e_phnum * sizeof (struct elf_phdr); in elf_fdpic_map_file()
926 struct elf_phdr *phdr; in elf_fdpic_map_file_constdisp_on_uclinux()
1010 struct elf_phdr *phdr; in elf_fdpic_map_file_by_direct_mmap()
[all …]
/openbmc/linux/arch/powerpc/kernel/
H A Dfadump.c370 size += sizeof(struct elf_phdr); /* place holder for cpu notes */ in get_fadump_area_size()
372 size += sizeof(struct elf_phdr) * (memblock_num_regions(memory) + 2); in get_fadump_area_size()
761 struct elf_phdr *phdr; in fadump_update_elfcore_header()
766 phdr = (struct elf_phdr *)bufp; in fadump_update_elfcore_header()
982 elf->e_phentsize = sizeof(struct elf_phdr); in fadump_init_elfcore_header()
1070 struct elf_phdr *phdr; in fadump_create_elfcore_headers()
1085 phdr = (struct elf_phdr *)bufp; in fadump_create_elfcore_headers()
1086 bufp += sizeof(struct elf_phdr); in fadump_create_elfcore_headers()
1100 phdr = (struct elf_phdr *)bufp; in fadump_create_elfcore_headers()
1101 bufp += sizeof(struct elf_phdr); in fadump_create_elfcore_headers()
[all …]
/openbmc/linux/include/linux/
H A Delf.h42 #define elf_phdr elf32_phdr macro
54 #define elf_phdr elf64_phdr macro
H A Delf-fdpic.h30 struct elf_phdr *phdrs; /* ref copy of PT_PHDR table */
H A Dkexec.h282 const struct elf_phdr *proghdrs;
/openbmc/qemu/bsd-user/freebsd/
H A Dtarget_os_elf.h108 NEW_AUX_ENT(AT_PHENT, (abi_ulong)(sizeof(struct elf_phdr))); in target_create_elf_tables()
/openbmc/linux/arch/arm64/kernel/
H A Delfcore.c96 struct elf_phdr phdr; in elf_core_write_extra_phdrs()
/openbmc/qemu/bsd-user/openbsd/
H A Dtarget_os_elf.h120 NEW_AUX_ENT(AT_PHENT, (abi_ulong)(sizeof(struct elf_phdr))); in target_create_elf_tables()
/openbmc/qemu/bsd-user/netbsd/
H A Dtarget_os_elf.h120 NEW_AUX_ENT(AT_PHENT, (abi_ulong)(sizeof(struct elf_phdr))); in target_create_elf_tables()
/openbmc/linux/fs/proc/
H A Dkcore.c120 *phdrs_len = *nphdr * sizeof(struct elf_phdr); in get_kcore_size()
370 .e_phentsize = sizeof(struct elf_phdr), in read_kcore_iter()
386 struct elf_phdr *phdrs, *phdr; in read_kcore_iter()
/openbmc/qemu/linux-user/
H A Delfload.c2140 static void bswap_phdr(struct elf_phdr *phdr, int phnum) in bswap_phdr()
2192 static inline void bswap_phdr(struct elf_phdr *phdr, int phnum) { } in bswap_phdr()
2226 && ehdr->e_phentsize == sizeof(struct elf_phdr) in elf_check_ehdr()
2620 NEW_AUX_ENT(AT_PHENT, (abi_ulong)(sizeof (struct elf_phdr))); in create_elf_tables()
3108 const struct elf_phdr *phdr, in parse_elf_properties()
3198 g_autofree struct elf_phdr *phdr = NULL; in load_elf_image()
3223 ehdr->e_phnum * sizeof(struct elf_phdr), in load_elf_image()
3243 struct elf_phdr *eppnt = phdr + i; in load_elf_image()
3419 struct elf_phdr *eppnt = phdr + i; in load_elf_image()
4114 elf->e_phentsize = sizeof(struct elf_phdr); in fill_elf_header()
[all …]
/openbmc/qemu/include/hw/
H A Delf_ops.h.inc18 static void glue(bswap_phdr, SZ)(struct elf_phdr *phdr)
204 struct elf_phdr *ph, int elf_machine)
327 struct elf_phdr *phdr = NULL, *ph;
472 struct elf_phdr *jph = &phdr[j];
/openbmc/linux/arch/riscv/kernel/
H A Delf_kexec.c44 const struct elf_phdr *phdr; in riscv_kexec_elf_load()
82 const struct elf_phdr *phdr; in elf_find_pbase()
/openbmc/linux/arch/mips/kernel/
H A Dvpe.c697 struct elf_phdr *phdr = (struct elf_phdr *) in vpe_elfload()
/openbmc/qemu/include/
H A Delf.h1768 #define elf_phdr elf32_phdr macro
1784 #define elf_phdr elf64_phdr macro
/openbmc/qemu/hw/core/
H A Dloader.c311 #undef elf_phdr
321 #define elf_phdr elf64_phdr macro