aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/Kconfig3
-rw-r--r--arch/mips/include/asm/module.h10
-rw-r--r--arch/mips/kernel/Makefile2
3 files changed, 12 insertions, 3 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index faf65286574e..dccdfcd9e18e 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -36,6 +36,9 @@ config MIPS
36 select BUILDTIME_EXTABLE_SORT 36 select BUILDTIME_EXTABLE_SORT
37 select GENERIC_CLOCKEVENTS 37 select GENERIC_CLOCKEVENTS
38 select GENERIC_CMOS_UPDATE 38 select GENERIC_CMOS_UPDATE
39 select HAVE_MOD_ARCH_SPECIFIC
40 select MODULES_USE_ELF_REL
41 select MODULES_USE_ELF_RELA if 64BIT
39 42
40menu "Machine selection" 43menu "Machine selection"
41 44
diff --git a/arch/mips/include/asm/module.h b/arch/mips/include/asm/module.h
index dca8bce8c7ab..26137da1c713 100644
--- a/arch/mips/include/asm/module.h
+++ b/arch/mips/include/asm/module.h
@@ -35,11 +35,14 @@ typedef struct {
35} Elf64_Mips_Rela; 35} Elf64_Mips_Rela;
36 36
37#ifdef CONFIG_32BIT 37#ifdef CONFIG_32BIT
38
39#define Elf_Shdr Elf32_Shdr 38#define Elf_Shdr Elf32_Shdr
40#define Elf_Sym Elf32_Sym 39#define Elf_Sym Elf32_Sym
41#define Elf_Ehdr Elf32_Ehdr 40#define Elf_Ehdr Elf32_Ehdr
42#define Elf_Addr Elf32_Addr 41#define Elf_Addr Elf32_Addr
42#define Elf_Rel Elf32_Rel
43#define Elf_Rela Elf32_Rela
44#define ELF_R_TYPE(X) ELF32_R_TYPE(X)
45#define ELF_R_SYM(X) ELF32_R_SYM(X)
43 46
44#define Elf_Mips_Rel Elf32_Rel 47#define Elf_Mips_Rel Elf32_Rel
45#define Elf_Mips_Rela Elf32_Rela 48#define Elf_Mips_Rela Elf32_Rela
@@ -50,11 +53,14 @@ typedef struct {
50#endif 53#endif
51 54
52#ifdef CONFIG_64BIT 55#ifdef CONFIG_64BIT
53
54#define Elf_Shdr Elf64_Shdr 56#define Elf_Shdr Elf64_Shdr
55#define Elf_Sym Elf64_Sym 57#define Elf_Sym Elf64_Sym
56#define Elf_Ehdr Elf64_Ehdr 58#define Elf_Ehdr Elf64_Ehdr
57#define Elf_Addr Elf64_Addr 59#define Elf_Addr Elf64_Addr
60#define Elf_Rel Elf64_Rel
61#define Elf_Rela Elf64_Rela
62#define ELF_R_TYPE(X) ELF64_R_TYPE(X)
63#define ELF_R_SYM(X) ELF64_R_SYM(X)
58 64
59#define Elf_Mips_Rel Elf64_Mips_Rel 65#define Elf_Mips_Rel Elf64_Mips_Rel
60#define Elf_Mips_Rela Elf64_Mips_Rela 66#define Elf_Mips_Rela Elf64_Mips_Rela
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index e2c14999839a..cd1e6c2421b2 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -31,7 +31,7 @@ obj-$(CONFIG_SYNC_R4K) += sync-r4k.o
31 31
32obj-$(CONFIG_STACKTRACE) += stacktrace.o 32obj-$(CONFIG_STACKTRACE) += stacktrace.o
33obj-$(CONFIG_MODULES) += mips_ksyms.o module.o 33obj-$(CONFIG_MODULES) += mips_ksyms.o module.o
34obj-$(CONFIG_MODULES) += module-rela.o 34obj-$(CONFIG_MODULES_USE_ELF_RELA) += module-rela.o
35 35
36obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o 36obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o
37 37