Loading...
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _ASM_M68K_MODULE_H
3#define _ASM_M68K_MODULE_H
4
5#include <asm-generic/module.h>
6
7enum m68k_fixup_type {
8 m68k_fixup_memoffset,
9 m68k_fixup_vnode_shift,
10};
11
12struct m68k_fixup_info {
13 enum m68k_fixup_type type;
14 void *addr;
15};
16
17struct mod_arch_specific {
18 struct m68k_fixup_info *fixup_start, *fixup_end;
19};
20
21#ifdef CONFIG_MMU
22
23#define MODULE_ARCH_INIT { \
24 .fixup_start = __start_fixup, \
25 .fixup_end = __stop_fixup, \
26}
27
28
29#define m68k_fixup(type, addr) \
30 " .section \".m68k_fixup\",\"aw\"\n" \
31 " .long " #type "," #addr "\n" \
32 " .previous\n"
33
34#endif /* CONFIG_MMU */
35
36extern struct m68k_fixup_info __start_fixup[], __stop_fixup[];
37
38struct module;
39extern void module_fixup(struct module *mod, struct m68k_fixup_info *start,
40 struct m68k_fixup_info *end);
41
42#endif /* _ASM_M68K_MODULE_H */
1#ifndef _ASM_M68K_MODULE_H
2#define _ASM_M68K_MODULE_H
3
4enum m68k_fixup_type {
5 m68k_fixup_memoffset,
6 m68k_fixup_vnode_shift,
7};
8
9struct m68k_fixup_info {
10 enum m68k_fixup_type type;
11 void *addr;
12};
13
14struct mod_arch_specific {
15 struct m68k_fixup_info *fixup_start, *fixup_end;
16};
17
18#ifdef CONFIG_MMU
19
20#define MODULE_ARCH_INIT { \
21 .fixup_start = __start_fixup, \
22 .fixup_end = __stop_fixup, \
23}
24
25
26#define m68k_fixup(type, addr) \
27 " .section \".m68k_fixup\",\"aw\"\n" \
28 " .long " #type "," #addr "\n" \
29 " .previous\n"
30
31#endif /* CONFIG_MMU */
32
33extern struct m68k_fixup_info __start_fixup[], __stop_fixup[];
34
35struct module;
36extern void module_fixup(struct module *mod, struct m68k_fixup_info *start,
37 struct m68k_fixup_info *end);
38
39#define Elf_Shdr Elf32_Shdr
40#define Elf_Sym Elf32_Sym
41#define Elf_Ehdr Elf32_Ehdr
42
43#endif /* _ASM_M68K_MODULE_H */