hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/arm/include/asm/module.h
....@@ -47,28 +47,15 @@
4747 struct module;
4848 u32 get_module_plt(struct module *mod, unsigned long loc, Elf32_Addr val);
4949
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 */
6350 #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;
6856
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
7360
7461 #endif /* _ASM_ARM_MODULE_H */