| 1 | #ifndef _ASM_MODULE_H
|
| 2 | #define _ASM_MODULE_H
|
| 3 |
|
| 4 | #include <linux/config.h>
|
| 5 | #include <linux/list.h>
|
| 6 | #include <asm/uaccess.h>
|
| 7 |
|
| 8 | struct mod_arch_specific {
|
| 9 |
|
| 10 | struct list_head dbe_list;
|
| 11 | const struct exception_table_entry *dbe_start;
|
| 12 | const struct exception_table_entry *dbe_end;
|
| 13 | };
|
| 14 |
|
| 15 | typedef uint8_t Elf64_Byte;
|
| 16 |
|
| 17 | typedef struct
|
| 18 | {
|
| 19 | Elf64_Addr r_offset;
|
| 20 | Elf64_Word r_sym;
|
| 21 | Elf64_Byte r_ssym;
|
| 22 | Elf64_Byte r_type3;
|
| 23 | Elf64_Byte r_type2;
|
| 24 | Elf64_Byte r_type;
|
| 25 | Elf64_Sxword r_addend;
|
| 26 | } Elf64_Mips_Rela;
|
| 27 |
|
| 28 | #ifdef CONFIG_MIPS32
|
| 29 |
|
| 30 | #define Elf_Shdr Elf32_Shdr
|
| 31 | #define Elf_Sym Elf32_Sym
|
| 32 | #define Elf_Ehdr Elf32_Ehdr
|
| 33 |
|
| 34 | #endif
|
| 35 |
|
| 36 | #ifdef CONFIG_MIPS64
|
| 37 |
|
| 38 | #define Elf_Shdr Elf64_Shdr
|
| 39 | #define Elf_Sym Elf64_Sym
|
| 40 | #define Elf_Ehdr Elf64_Ehdr
|
| 41 |
|
| 42 | #endif
|
| 43 |
|
| 44 | #ifdef CONFIG_MODULES
|
| 45 |
|
| 46 | const struct exception_table_entry*search_module_dbetables(unsigned long addr);
|
| 47 | #else
|
| 48 |
|
| 49 | static inline const struct exception_table_entry *
|
| 50 | search_module_dbetables(unsigned long addr)
|
| 51 | {
|
| 52 | return NULL;
|
| 53 | }
|
| 54 | #endif
|
| 55 |
|
| 56 | #endif
|