| 1 | #ifndef _ASM_MODULE_H |
|---|
| 2 | #define _ASM_MODULE_H |
|---|
| 3 | |
|---|
| 4 | struct mod_arch_specific { |
|---|
| 5 | /* Data Bus Error exception tables */ |
|---|
| 6 | struct list_head dbe_list; |
|---|
| 7 | const struct exception_table_entry *dbe_start; |
|---|
| 8 | const struct exception_table_entry *dbe_end; |
|---|
| 9 | }; |
|---|
| 10 | |
|---|
| 11 | typedef uint8_t Elf64_Byte; /* Type for a 8-bit quantity. */ |
|---|
| 12 | |
|---|
| 13 | typedef struct |
|---|
| 14 | { |
|---|
| 15 | Elf64_Addr r_offset; /* Address of relocation. */ |
|---|
| 16 | Elf64_Word r_sym; /* Symbol index. */ |
|---|
| 17 | Elf64_Byte r_ssym; /* Special symbol. */ |
|---|
| 18 | Elf64_Byte r_type3; /* Third relocation. */ |
|---|
| 19 | Elf64_Byte r_type2; /* Second relocation. */ |
|---|
| 20 | Elf64_Byte r_type; /* First relocation. */ |
|---|
| 21 | Elf64_Sxword r_addend; /* Addend. */ |
|---|
| 22 | } Elf64_Mips_Rela; |
|---|
| 23 | |
|---|
| 24 | #ifndef __mips64 |
|---|
| 25 | |
|---|
| 26 | #define Elf_Shdr Elf32_Shdr |
|---|
| 27 | #define Elf_Sym Elf32_Sym |
|---|
| 28 | #define Elf_Ehdr Elf32_Ehdr |
|---|
| 29 | |
|---|
| 30 | #endif |
|---|
| 31 | |
|---|
| 32 | #ifdef __mips64 |
|---|
| 33 | |
|---|
| 34 | #define Elf_Shdr Elf64_Shdr |
|---|
| 35 | #define Elf_Sym Elf64_Sym |
|---|
| 36 | #define Elf_Ehdr Elf64_Ehdr |
|---|
| 37 | |
|---|
| 38 | #endif |
|---|
| 39 | |
|---|
| 40 | #ifdef CONFIG_MODULES |
|---|
| 41 | /* Given an address, look for it in the exception tables. */ |
|---|
| 42 | const struct exception_table_entry*search_module_dbetables(unsigned long addr); |
|---|
| 43 | #else |
|---|
| 44 | /* Given an address, look for it in the exception tables. */ |
|---|
| 45 | static inline const struct exception_table_entry * |
|---|
| 46 | search_module_dbetables(unsigned long addr) |
|---|
| 47 | { |
|---|
| 48 | return NULL; |
|---|
| 49 | } |
|---|
| 50 | #endif |
|---|
| 51 | |
|---|
| 52 | #endif /* _ASM_MODULE_H */ |
|---|