module.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef _ASM_ARM_MODULE_H
  2. #define _ASM_ARM_MODULE_H
  3. #include <asm-generic/module.h>
  4. struct unwind_table;
  5. #ifdef CONFIG_ARM_UNWIND
  6. enum {
  7. ARM_SEC_INIT,
  8. ARM_SEC_DEVINIT,
  9. ARM_SEC_CORE,
  10. ARM_SEC_EXIT,
  11. ARM_SEC_DEVEXIT,
  12. ARM_SEC_HOT,
  13. ARM_SEC_UNLIKELY,
  14. ARM_SEC_MAX,
  15. };
  16. #endif
  17. struct mod_arch_specific {
  18. #ifdef CONFIG_ARM_UNWIND
  19. struct unwind_table *unwind[ARM_SEC_MAX];
  20. #endif
  21. #ifdef CONFIG_ARM_MODULE_PLTS
  22. struct elf32_shdr *core_plt;
  23. struct elf32_shdr *init_plt;
  24. int core_plt_count;
  25. int init_plt_count;
  26. #endif
  27. };
  28. u32 get_module_plt(struct module *mod, unsigned long loc, Elf32_Addr val);
  29. /*
  30. * Add the ARM architecture version to the version magic string
  31. */
  32. #define MODULE_ARCH_VERMAGIC_ARMVSN "ARMv" __stringify(__LINUX_ARM_ARCH__) " "
  33. /* Add __virt_to_phys patching state as well */
  34. #ifdef CONFIG_ARM_PATCH_PHYS_VIRT
  35. #define MODULE_ARCH_VERMAGIC_P2V "p2v8 "
  36. #else
  37. #define MODULE_ARCH_VERMAGIC_P2V ""
  38. #endif
  39. /* Add instruction set architecture tag to distinguish ARM/Thumb kernels */
  40. #ifdef CONFIG_THUMB2_KERNEL
  41. #define MODULE_ARCH_VERMAGIC_ARMTHUMB "thumb2 "
  42. #else
  43. #define MODULE_ARCH_VERMAGIC_ARMTHUMB ""
  44. #endif
  45. #define MODULE_ARCH_VERMAGIC \
  46. MODULE_ARCH_VERMAGIC_ARMVSN \
  47. MODULE_ARCH_VERMAGIC_ARMTHUMB \
  48. MODULE_ARCH_VERMAGIC_P2V
  49. #endif /* _ASM_ARM_MODULE_H */