/*1* linux/arch/unicore32/kernel/elf.c2*3* Code specific to PKUnity SoC and UniCore ISA4*5* Copyright (C) 2001-2010 GUAN Xue-tao6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License version 2 as9* published by the Free Software Foundation.10*/11#include <linux/module.h>12#include <linux/sched.h>13#include <linux/personality.h>14#include <linux/binfmts.h>15#include <linux/elf.h>1617int elf_check_arch(const struct elf32_hdr *x)18{19/* Make sure it's an UniCore executable */20if (x->e_machine != EM_UNICORE)21return 0;2223/* Make sure the entry address is reasonable */24if (x->e_entry & 3)25return 0;2627return 1;28}29EXPORT_SYMBOL(elf_check_arch);3031void elf_set_personality(const struct elf32_hdr *x)32{33unsigned int personality = PER_LINUX;3435set_personality(personality);36}37EXPORT_SYMBOL(elf_set_personality);383940