summaryrefslogtreecommitdiff
path: root/arch/loongarch/include/asm/vermagic.h
diff options
context:
space:
mode:
authorHuacai Chen <chenhuacai@loongson.cn>2022-05-31 13:04:11 +0300
committerHuacai Chen <chenhuacai@loongson.cn>2022-06-03 15:09:28 +0300
commitfcdfe9d22bed08409968a751e93112f742208be6 (patch)
tree14bbbe55e6c6e715223006e91160c55d6bd113ec /arch/loongarch/include/asm/vermagic.h
parentb74baf4ad05b5ebe3152592fb2fa80d51681392a (diff)
downloadlinux-fcdfe9d22bed08409968a751e93112f742208be6.tar.xz
LoongArch: Add ELF and module support
Add ELF-related definition and module relocation code for basic LoongArch support. Cc: Jessica Yu <jeyu@kernel.org> Reviewed-by: WANG Xuerui <git@xen0n.name> Reviewed-by: Luis Chamberlain <mcgrof@kernel.org> Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/include/asm/vermagic.h')
-rw-r--r--arch/loongarch/include/asm/vermagic.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/loongarch/include/asm/vermagic.h b/arch/loongarch/include/asm/vermagic.h
new file mode 100644
index 000000000000..8b47ccfe3aad
--- /dev/null
+++ b/arch/loongarch/include/asm/vermagic.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
+ */
+#ifndef _ASM_VERMAGIC_H
+#define _ASM_VERMAGIC_H
+
+#define MODULE_PROC_FAMILY "LOONGARCH "
+
+#ifdef CONFIG_32BIT
+#define MODULE_KERNEL_TYPE "32BIT "
+#elif defined CONFIG_64BIT
+#define MODULE_KERNEL_TYPE "64BIT "
+#endif
+
+#define MODULE_ARCH_VERMAGIC \
+ MODULE_PROC_FAMILY MODULE_KERNEL_TYPE
+
+#endif /* _ASM_VERMAGIC_H */