module.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef _ASM_ARM_MODULE_H
  2. #define _ASM_ARM_MODULE_H
  3. #define Elf_Shdr Elf32_Shdr
  4. #define Elf_Sym Elf32_Sym
  5. #define Elf_Ehdr Elf32_Ehdr
  6. struct unwind_table;
  7. #ifdef CONFIG_ARM_UNWIND
  8. enum {
  9. ARM_SEC_INIT,
  10. ARM_SEC_DEVINIT,
  11. ARM_SEC_CORE,
  12. ARM_SEC_EXIT,
  13. ARM_SEC_DEVEXIT,
  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. };
  22. /*
  23. * Add the ARM architecture version to the version magic string
  24. */
  25. #define MODULE_ARCH_VERMAGIC_ARMVSN "ARMv" __stringify(__LINUX_ARM_ARCH__) " "
  26. /* Add __virt_to_phys patching state as well */
  27. #ifdef CONFIG_ARM_PATCH_PHYS_VIRT
  28. #ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
  29. #define MODULE_ARCH_VERMAGIC_P2V "p2v16 "
  30. #else
  31. #define MODULE_ARCH_VERMAGIC_P2V "p2v8 "
  32. #endif
  33. #else
  34. #define MODULE_ARCH_VERMAGIC_P2V ""
  35. #endif
  36. /* Add instruction set architecture tag to distinguish ARM/Thumb kernels */
  37. #ifdef CONFIG_THUMB2_KERNEL
  38. #define MODULE_ARCH_VERMAGIC_ARMTHUMB "thumb2 "
  39. #else
  40. #define MODULE_ARCH_VERMAGIC_ARMTHUMB ""
  41. #endif
  42. #define MODULE_ARCH_VERMAGIC \
  43. MODULE_ARCH_VERMAGIC_ARMVSN \
  44. MODULE_ARCH_VERMAGIC_ARMTHUMB \
  45. MODULE_ARCH_VERMAGIC_P2V
  46. #endif /* _ASM_ARM_MODULE_H */