module.h 686 B

123456789101112131415161718192021222324
  1. #ifndef __SPARC_MODULE_H
  2. #define __SPARC_MODULE_H
  3. struct mod_arch_specific { };
  4. /*
  5. * Use some preprocessor magic to define the correct symbol
  6. * for sparc32 and sparc64.
  7. * Elf_Addr becomes Elf32_Addr for sparc32 and Elf64_Addr for sparc64
  8. */
  9. #define ___ELF(a, b, c) a##b##c
  10. #define __ELF(a, b, c) ___ELF(a, b, c)
  11. #define _Elf(t) __ELF(Elf, CONFIG_BITS, t)
  12. #define _ELF(t) __ELF(ELF, CONFIG_BITS, t)
  13. #define Elf_Shdr _Elf(_Shdr)
  14. #define Elf_Sym _Elf(_Sym)
  15. #define Elf_Ehdr _Elf(_Ehdr)
  16. #define Elf_Rela _Elf(_Rela)
  17. #define Elf_Addr _Elf(_Addr)
  18. #define ELF_R_SYM _ELF(_R_SYM)
  19. #define ELF_R_TYPE _ELF(_R_TYPE)
  20. #endif /* __SPARC_MODULE_H */