Greg Ungerer | a5505464 | 2009-02-19 14:18:23 +1000 | [diff] [blame] | 1 | #ifndef _ASM_M68K_MODULE_H |
| 2 | #define _ASM_M68K_MODULE_H |
| 3 | |
| 4 | #ifdef CONFIG_MMU |
| 5 | |
| 6 | struct mod_arch_specific { |
| 7 | struct m68k_fixup_info *fixup_start, *fixup_end; |
| 8 | }; |
| 9 | |
| 10 | #define MODULE_ARCH_INIT { \ |
| 11 | .fixup_start = __start_fixup, \ |
| 12 | .fixup_end = __stop_fixup, \ |
| 13 | } |
| 14 | |
| 15 | |
| 16 | enum m68k_fixup_type { |
| 17 | m68k_fixup_memoffset, |
| 18 | m68k_fixup_vnode_shift, |
| 19 | }; |
| 20 | |
| 21 | struct m68k_fixup_info { |
| 22 | enum m68k_fixup_type type; |
| 23 | void *addr; |
| 24 | }; |
| 25 | |
| 26 | #define m68k_fixup(type, addr) \ |
| 27 | " .section \".m68k_fixup\",\"aw\"\n" \ |
| 28 | " .long " #type "," #addr "\n" \ |
| 29 | " .previous\n" |
| 30 | |
| 31 | extern struct m68k_fixup_info __start_fixup[], __stop_fixup[]; |
| 32 | |
| 33 | struct module; |
| 34 | extern void module_fixup(struct module *mod, struct m68k_fixup_info *start, |
| 35 | struct m68k_fixup_info *end); |
| 36 | |
Sam Ravnborg | 4914802 | 2009-01-16 21:58:10 +1000 | [diff] [blame] | 37 | #else |
Greg Ungerer | a5505464 | 2009-02-19 14:18:23 +1000 | [diff] [blame] | 38 | |
| 39 | struct mod_arch_specific { |
| 40 | }; |
| 41 | |
| 42 | #endif /* CONFIG_MMU */ |
| 43 | |
| 44 | #define Elf_Shdr Elf32_Shdr |
| 45 | #define Elf_Sym Elf32_Sym |
| 46 | #define Elf_Ehdr Elf32_Ehdr |
| 47 | |
| 48 | #endif /* _ASM_M68K_MODULE_H */ |