module.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef __ASM_GENERIC_MODULE_H
  2. #define __ASM_GENERIC_MODULE_H
  3. /*
  4. * Many architectures just need a simple module
  5. * loader without arch specific data.
  6. */
  7. #ifndef CONFIG_HAVE_MOD_ARCH_SPECIFIC
  8. struct mod_arch_specific
  9. {
  10. };
  11. #endif
  12. #ifdef CONFIG_64BIT
  13. #define Elf_Shdr Elf64_Shdr
  14. #define Elf_Phdr Elf64_Phdr
  15. #define Elf_Sym Elf64_Sym
  16. #define Elf_Dyn Elf64_Dyn
  17. #define Elf_Ehdr Elf64_Ehdr
  18. #define Elf_Addr Elf64_Addr
  19. #ifdef CONFIG_MODULES_USE_ELF_REL
  20. #define Elf_Rel Elf64_Rel
  21. #endif
  22. #ifdef CONFIG_MODULES_USE_ELF_RELA
  23. #define Elf_Rela Elf64_Rela
  24. #endif
  25. #define ELF_R_TYPE(X) ELF64_R_TYPE(X)
  26. #define ELF_R_SYM(X) ELF64_R_SYM(X)
  27. #else /* CONFIG_64BIT */
  28. #define Elf_Shdr Elf32_Shdr
  29. #define Elf_Phdr Elf32_Phdr
  30. #define Elf_Sym Elf32_Sym
  31. #define Elf_Dyn Elf32_Dyn
  32. #define Elf_Ehdr Elf32_Ehdr
  33. #define Elf_Addr Elf32_Addr
  34. #ifdef CONFIG_MODULES_USE_ELF_REL
  35. #define Elf_Rel Elf32_Rel
  36. #endif
  37. #ifdef CONFIG_MODULES_USE_ELF_RELA
  38. #define Elf_Rela Elf32_Rela
  39. #endif
  40. #define ELF_R_TYPE(X) ELF32_R_TYPE(X)
  41. #define ELF_R_SYM(X) ELF32_R_SYM(X)
  42. #endif
  43. #endif /* __ASM_GENERIC_MODULE_H */