.. | .. |
---|
47 | 47 | struct module; |
---|
48 | 48 | u32 get_module_plt(struct module *mod, unsigned long loc, Elf32_Addr val); |
---|
49 | 49 | |
---|
50 | | -/* |
---|
51 | | - * Add the ARM architecture version to the version magic string |
---|
52 | | - */ |
---|
53 | | -#define MODULE_ARCH_VERMAGIC_ARMVSN "ARMv" __stringify(__LINUX_ARM_ARCH__) " " |
---|
54 | | - |
---|
55 | | -/* Add __virt_to_phys patching state as well */ |
---|
56 | | -#ifdef CONFIG_ARM_PATCH_PHYS_VIRT |
---|
57 | | -#define MODULE_ARCH_VERMAGIC_P2V "p2v8 " |
---|
58 | | -#else |
---|
59 | | -#define MODULE_ARCH_VERMAGIC_P2V "" |
---|
60 | | -#endif |
---|
61 | | - |
---|
62 | | -/* Add instruction set architecture tag to distinguish ARM/Thumb kernels */ |
---|
63 | 50 | #ifdef CONFIG_THUMB2_KERNEL |
---|
64 | | -#define MODULE_ARCH_VERMAGIC_ARMTHUMB "thumb2 " |
---|
65 | | -#else |
---|
66 | | -#define MODULE_ARCH_VERMAGIC_ARMTHUMB "" |
---|
67 | | -#endif |
---|
| 51 | +#define HAVE_ARCH_KALLSYMS_SYMBOL_VALUE |
---|
| 52 | +static inline unsigned long kallsyms_symbol_value(const Elf_Sym *sym) |
---|
| 53 | +{ |
---|
| 54 | + if (ELF_ST_TYPE(sym->st_info) == STT_FUNC) |
---|
| 55 | + return sym->st_value & ~1; |
---|
68 | 56 | |
---|
69 | | -#define MODULE_ARCH_VERMAGIC \ |
---|
70 | | - MODULE_ARCH_VERMAGIC_ARMVSN \ |
---|
71 | | - MODULE_ARCH_VERMAGIC_ARMTHUMB \ |
---|
72 | | - MODULE_ARCH_VERMAGIC_P2V |
---|
| 57 | + return sym->st_value; |
---|
| 58 | +} |
---|
| 59 | +#endif |
---|
73 | 60 | |
---|
74 | 61 | #endif /* _ASM_ARM_MODULE_H */ |
---|