xref: /linux/arch/loongarch/kernel/elf.c (revision 702648721db590b3425c31ade294000e18808345)
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Author: Huacai Chen <chenhuacai@loongson.cn>
4  * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
5  */
6 
7 #include <linux/binfmts.h>
8 #include <linux/elf.h>
9 #include <linux/export.h>
10 #include <linux/sched.h>
11 
12 #include <asm/cpu-features.h>
13 #include <asm/cpu-info.h>
14 
15 int arch_elf_pt_proc(void *_ehdr, void *_phdr, struct file *elf,
16 		     bool is_interp, struct arch_elf_state *state)
17 {
18 	return 0;
19 }
20 
21 int arch_check_elf(void *_ehdr, bool has_interpreter, void *_interp_ehdr,
22 		   struct arch_elf_state *state)
23 {
24 	return 0;
25 }
26 
27 void loongarch_set_personality_fcsr(struct arch_elf_state *state)
28 {
29 	current->thread.fpu.fcsr = boot_cpu_data.fpu_csr0;
30 }
31