1 // SPDX-License-Identifier: GPL-2.0-only
3 * linux/arch/unicore32/kernel/elf.c
5 * Code specific to PKUnity SoC and UniCore ISA
7 * Copyright (C) 2001-2010 GUAN Xue-tao
9 #include <linux/module.h>
10 #include <linux/sched.h>
11 #include <linux/personality.h>
12 #include <linux/binfmts.h>
13 #include <linux/elf.h>
15 int elf_check_arch(const struct elf32_hdr
*x
)
17 /* Make sure it's an UniCore executable */
18 if (x
->e_machine
!= EM_UNICORE
)
21 /* Make sure the entry address is reasonable */
27 EXPORT_SYMBOL(elf_check_arch
);
29 void elf_set_personality(const struct elf32_hdr
*x
)
31 unsigned int personality
= PER_LINUX
;
33 set_personality(personality
);
35 EXPORT_SYMBOL(elf_set_personality
);