Home
last modified time | relevance | path

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

/Linux-v5.15/arch/alpha/boot/tools/
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 …]
/Linux-v5.15/arch/x86/um/
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()
/Linux-v5.15/arch/ia64/kernel/
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()
/Linux-v5.15/kernel/
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()
/Linux-v5.15/fs/
Dbinfmt_elf.c261 NEW_AUX_ENT(AT_PHENT, sizeof(struct elf_phdr)); in create_elf_tables()
364 const struct elf_phdr *eppnt, int prot, int type, in elf_map()
402 static unsigned long total_mapping_size(const struct elf_phdr *cmds, int nr) in total_mapping_size()
431 static unsigned long maximum_alignment(struct elf_phdr *cmds, int nr) in maximum_alignment()
460 static struct elf_phdr *load_elf_phdrs(const struct elfhdr *elf_ex, in load_elf_phdrs()
463 struct elf_phdr *elf_phdata = NULL; in load_elf_phdrs()
471 if (elf_ex->e_phentsize != sizeof(struct elf_phdr)) in load_elf_phdrs()
476 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 …]
Dcompat_binfmt_elf.c29 #undef elf_phdr
35 #define elf_phdr elf32_phdr macro
Dbinfmt_elf_fdpic.c146 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()
808 stop += params->hdr.e_phnum * sizeof (struct elf_phdr); in elf_fdpic_map_file()
1254 elf->e_phentsize = sizeof(struct elf_phdr); in fill_elf_fdpic_header()
1262 static inline void fill_elf_note_phdr(struct elf_phdr *phdr, int sz, loff_t offset) in fill_elf_note_phdr()
1477 struct elf_phdr *phdr4note = NULL; in elf_fdpic_core_dump()
1548 offset += segs * sizeof(struct elf_phdr); /* Program headers */ in elf_fdpic_core_dump()
[all …]
/Linux-v5.15/include/linux/
Delf.h42 #define elf_phdr elf32_phdr macro
54 #define elf_phdr elf64_phdr macro
Delf-fdpic.h18 struct elf_phdr *phdrs; /* ref copy of PT_PHDR table */
Dkexec.h237 const struct elf_phdr *proghdrs;
/Linux-v5.15/arch/powerpc/kernel/
Dfadump.c365 size += sizeof(struct elf_phdr); /* place holder for cpu notes */ in get_fadump_area_size()
367 size += sizeof(struct elf_phdr) * (memblock_num_regions(memory) + 2); in get_fadump_area_size()
757 struct elf_phdr *phdr; in fadump_update_elfcore_header()
762 phdr = (struct elf_phdr *)bufp; in fadump_update_elfcore_header()
971 elf->e_phentsize = sizeof(struct elf_phdr); in fadump_init_elfcore_header()
1059 struct elf_phdr *phdr; in fadump_create_elfcore_headers()
1074 phdr = (struct elf_phdr *)bufp; in fadump_create_elfcore_headers()
1075 bufp += sizeof(struct elf_phdr); in fadump_create_elfcore_headers()
1089 phdr = (struct elf_phdr *)bufp; in fadump_create_elfcore_headers()
1090 bufp += sizeof(struct elf_phdr); in fadump_create_elfcore_headers()
[all …]
/Linux-v5.15/fs/proc/
Dkcore.c107 *phdrs_len = *nphdr * sizeof(struct elf_phdr); in get_kcore_size()
355 .e_phentsize = sizeof(struct elf_phdr), in read_kcore()
372 struct elf_phdr *phdrs, *phdr; in read_kcore()
/Linux-v5.15/arch/mips/kernel/
Dvpe.c698 struct elf_phdr *phdr = (struct elf_phdr *) in vpe_elfload()