Searched refs:ehdr (Results 1 - 25 of 105) sorted by path

12345

/linux-master/arch/mips/vdso/
H A Dgenvdso.h9 const ELF(Ehdr) *ehdr = vdso;
15 shdrs = vdso + FUNC(swap_uint)(ehdr->e_shoff);
16 sh_count = swap_uint16(ehdr->e_shnum);
17 sh_entsize = swap_uint16(ehdr->e_shentsize);
19 shdr = shdrs + (sh_entsize * swap_uint16(ehdr->e_shstrndx));
60 const ELF(Ehdr) *ehdr = vdso;
69 shdrs = vdso + FUNC(swap_uint)(ehdr->e_shoff);
70 sh_count = swap_uint16(ehdr->e_shnum);
71 sh_entsize = swap_uint16(ehdr->e_shentsize);
87 flags = swap_uint32(ehdr
[all...]
H A Dgenvdso.c113 const Elf32_Ehdr *ehdr; local
139 ehdr = addr;
141 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0) {
148 elf_class = ehdr->e_ident[EI_CLASS];
160 switch (ehdr->e_ident[EI_DATA]) {
163 need_swap = ehdr->e_ident[EI_DATA] != HOST_ORDER;
172 if (swap_uint16(ehdr->e_machine) != EM_MIPS) {
178 } else if (swap_uint16(ehdr->e_type) != ET_DYN) {
/linux-master/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/
H A Drammap.h19 u8 ever, u8 ehdr, u8 ecnt, u8 elen, int idx,
24 u8 ever, u8 ehdr, u8 ecnt, u8 elen, int idx,
/linux-master/drivers/gpu/drm/nouveau/nvkm/subdev/bios/
H A Drammap.c147 u8 ever, u8 ehdr, u8 ecnt, u8 elen, int idx, u8 *ver, u8 *hdr)
150 data = data + ehdr + (idx * elen);
191 u8 ever, u8 ehdr, u8 ecnt, u8 elen, int idx,
194 data = nvbios_rammapSe(bios, data, ever, ehdr, ecnt, elen, idx, ver, hdr);
146 nvbios_rammapSe(struct nvkm_bios *bios, u32 data, u8 ever, u8 ehdr, u8 ecnt, u8 elen, int idx, u8 *ver, u8 *hdr) argument
190 nvbios_rammapSp(struct nvkm_bios *bios, u32 data, u8 ever, u8 ehdr, u8 ecnt, u8 elen, int idx, u8 *ver, u8 *hdr, struct nvbios_ramcfg *p) argument
/linux-master/arch/arm/kernel/
H A Dmodule-plts.c209 int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, argument
214 Elf32_Shdr *s, *sechdrs_end = sechdrs + ehdr->e_shnum;
240 Elf32_Rel *rels = (void *)ehdr + s->sh_offset;
H A Dvdso.c100 static void * __init find_section(Elf32_Ehdr *ehdr, const char *name, argument
108 sechdrs = (void *)ehdr + ehdr->e_shoff;
109 secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset;
112 for (i = 1; i < ehdr->e_shnum; i++) {
116 return (void *)ehdr + sechdrs[i].sh_offset;
156 static void __init patch_vdso(void *ehdr) argument
161 .hdr = ehdr,
/linux-master/arch/arm64/include/asm/
H A Delf.h282 static inline int arch_elf_pt_proc(void *ehdr, void *phdr, argument
289 static inline int arch_check_elf(void *ehdr, bool has_interp, argument
/linux-master/arch/arm64/kernel/
H A Dmodule-plts.c280 int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, argument
293 for (i = 0; i < ehdr->e_shnum; i++) {
314 for (i = 0; i < ehdr->e_shnum; i++) {
315 Elf64_Rela *rels = (void *)ehdr + sechdrs[i].sh_offset;
/linux-master/arch/arm64/kernel/pi/
H A Drelacheck.c24 static Elf64_Ehdr *ehdr; variable
66 ehdr = mmap(0, stat.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
67 if (ehdr == MAP_FAILED) {
72 swap = ehdr->e_ident[EI_DATA] != HOST_ORDER;
73 shdr = (void *)ehdr + swab_elfxword(ehdr->e_shoff);
74 strtab = (void *)ehdr +
75 swab_elfxword(shdr[swab_elfhword(ehdr->e_shstrndx)].sh_offset);
77 for (int i = 0; i < swab_elfhword(ehdr->e_shnum); i++) {
105 rela = (void *)ehdr
[all...]
/linux-master/arch/arm64/kvm/hyp/nvhe/
H A Dgen-hyprel.c134 Elf64_Ehdr *ehdr; member in struct:__anon5
202 for (var = elf.sh_table; var < elf.sh_table + elf16toh(elf.ehdr->e_shnum); ++var)
276 assert_ge(stat.st_size, sizeof(*elf.ehdr), "%lu");
277 elf.ehdr = elf_ptr(Elf64_Ehdr, 0);
280 assert_eq(elf.ehdr->e_ident[EI_MAG0], ELFMAG0, "0x%x");
281 assert_eq(elf.ehdr->e_ident[EI_MAG1], ELFMAG1, "0x%x");
282 assert_eq(elf.ehdr->e_ident[EI_MAG2], ELFMAG2, "0x%x");
283 assert_eq(elf.ehdr->e_ident[EI_MAG3], ELFMAG3, "0x%x");
286 assert_eq(elf.ehdr->e_ident[EI_CLASS], ELFCLASS64, "%u");
287 assert_eq(elf.ehdr
[all...]
/linux-master/arch/loongarch/include/asm/
H A Delf.h334 extern int arch_elf_pt_proc(void *ehdr, void *phdr, struct file *elf,
337 extern int arch_check_elf(void *ehdr, bool has_interpreter, void *interp_ehdr,
/linux-master/arch/loongarch/kernel/
H A Dmodule-sections.c104 int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, argument
113 for (i = 0; i < ehdr->e_shnum; i++) {
138 for (i = 0; i < ehdr->e_shnum; i++) {
140 Elf_Rela *relas = (void *)ehdr + sechdrs[i].sh_offset;
/linux-master/arch/mips/boot/tools/
H A Drelocs.c14 static Elf_Ehdr ehdr; variable
96 sec_strtab = secs[ehdr.e_shstrndx].strtab;
97 if (shndx < ehdr.e_shnum)
112 for (i = 0; i < ehdr.e_shnum; i++)
163 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB)
171 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB)
179 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB)
191 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB)
207 if (fread(&ehdr, sizeof(ehdr),
[all...]
/linux-master/arch/mips/include/asm/
H A Delf.h488 extern int arch_elf_pt_proc(void *ehdr, void *phdr, struct file *elf,
491 extern int arch_check_elf(void *ehdr, bool has_interpreter, void *interp_ehdr,
/linux-master/arch/mips/kernel/
H A Delf.c82 } *ehdr = _ehdr; local
91 elf32 = ehdr->e32.e_ident[EI_CLASS] == ELFCLASS32;
92 flags = elf32 ? ehdr->e32.e_flags : ehdr->e64.e_flags;
141 } *ehdr = _ehdr; local
151 elf32 = ehdr->e32.e_ident[EI_CLASS] == ELFCLASS32;
152 flags = elf32 ? ehdr->e32.e_flags : ehdr->e64.e_flags;
/linux-master/arch/parisc/boot/compressed/
H A Dmisc.c236 Elf64_Ehdr ehdr; local
239 Elf32_Ehdr ehdr;
245 memcpy(&ehdr, output, sizeof(ehdr));
246 if (ehdr.e_ident[EI_MAG0] != ELFMAG0 ||
247 ehdr.e_ident[EI_MAG1] != ELFMAG1 ||
248 ehdr.e_ident[EI_MAG2] != ELFMAG2 ||
249 ehdr.e_ident[EI_MAG3] != ELFMAG3) {
258 phdrs = malloc(sizeof(*phdrs) * ehdr.e_phnum);
262 memcpy(phdrs, output + ehdr
[all...]
/linux-master/arch/parisc/kernel/
H A Dkexec_file.c23 struct elfhdr ehdr; local
28 ret = kexec_build_elf_info(kernel_buf, kernel_len, &ehdr, &elf_info);
32 ret = kexec_elf_load(image, &ehdr, &elf_info, &kbuf, &kernel_load_addr);
36 image->start = __pa(elf_info.ehdr->e_entry);
/linux-master/arch/powerpc/kexec/
H A Delf_64.c37 struct elfhdr ehdr; local
46 ret = kexec_build_elf_info(kernel_buf, kernel_len, &ehdr, &elf_info);
58 ret = kexec_elf_load(image, &ehdr, &elf_info, &kbuf, &kernel_load_addr);
H A Dfile_load_64.c764 * @ehdr: ELF core header.
771 static void update_backup_region_phdr(struct kimage *image, Elf64_Ehdr *ehdr) argument
776 phdr = (Elf64_Phdr *)(ehdr + 1);
777 for (i = 0; i < ehdr->e_phnum; i++) {
/linux-master/arch/riscv/kernel/
H A Delf_kexec.c36 static int riscv_kexec_elf_load(struct kimage *image, struct elfhdr *ehdr, argument
48 for (i = 0; i < ehdr->e_phnum; i++) {
76 struct elfhdr *ehdr, struct kexec_elf_info *elf_info,
86 for (i = 0; i < ehdr->e_phnum; i++) {
115 image->start = ehdr->e_entry - lowest_vaddr + kbuf.mem;
206 struct elfhdr ehdr; local
211 ret = kexec_build_elf_info(kernel_buf, kernel_len, &ehdr, &elf_info);
215 ret = elf_find_pbase(image, kernel_len, &ehdr, &elf_info,
222 ret = riscv_kexec_elf_load(image, &ehdr, &elf_info,
382 sechdrs = (void *)pi->ehdr
75 elf_find_pbase(struct kimage *image, unsigned long kernel_len, struct elfhdr *ehdr, struct kexec_elf_info *elf_info, unsigned long *old_pbase, unsigned long *new_pbase) argument
[all...]
H A Dmodule-sections.c90 int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, argument
100 for (i = 0; i < ehdr->e_shnum; i++) {
123 for (i = 0; i < ehdr->e_shnum; i++) {
124 Elf_Rela *relas = (void *)ehdr + sechdrs[i].sh_offset;
/linux-master/arch/s390/include/asm/
H A Delf.h192 #define arch_check_elf(ehdr, interp, interp_ehdr, state) (0)
194 #define arch_elf_pt_proc(ehdr, phdr, elf, interp, state) \
209 #define arch_elf_pt_proc(ehdr, phdr, elf, interp, state) \
/linux-master/arch/s390/kernel/
H A Dcrash_dump.c454 static void *ehdr_init(Elf64_Ehdr *ehdr, int mem_chunk_cnt) argument
456 memset(ehdr, 0, sizeof(*ehdr));
457 memcpy(ehdr->e_ident, ELFMAG, SELFMAG);
458 ehdr->e_ident[EI_CLASS] = ELFCLASS64;
459 ehdr->e_ident[EI_DATA] = ELFDATA2MSB;
460 ehdr->e_ident[EI_VERSION] = EV_CURRENT;
461 memset(ehdr->e_ident + EI_PAD, 0, EI_NIDENT - EI_PAD);
462 ehdr->e_type = ET_CORE;
463 ehdr
[all...]
H A Dkexec_elf.c20 const Elf_Ehdr *ehdr; local
27 ehdr = (Elf_Ehdr *)kernel;
32 entry = ehdr->e_entry;
34 phdr = (void *)ehdr + ehdr->e_phoff;
35 for (i = 0; i < ehdr->e_phnum; i++, phdr++) {
73 const Elf_Ehdr *ehdr; local
79 ehdr = (Elf_Ehdr *)kernel;
81 if (ehdr->e_type != ET_EXEC ||
82 ehdr
114 const Elf_Ehdr *ehdr; local
[all...]
H A Dmachine_kexec_file.c321 sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff;
322 strtab = (char *)pi->ehdr + sechdrs[symtab->sh_link].sh_offset;
323 shstrtab = (char *)pi->ehdr + sechdrs[pi->ehdr->e_shstrndx].sh_offset;
325 relas = (void *)pi->ehdr + relsec->sh_offset;
333 sym = (void *)pi->ehdr + symtab->sh_offset;
351 if (sym->st_shndx >= pi->ehdr->e_shnum &&

Completed in 222 milliseconds

12345