module.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef _ASM_S390_MODULE_H
  2. #define _ASM_S390_MODULE_H
  3. /*
  4. * This file contains the s390 architecture specific module code.
  5. */
  6. struct mod_arch_syminfo
  7. {
  8. unsigned long got_offset;
  9. unsigned long plt_offset;
  10. int got_initialized;
  11. int plt_initialized;
  12. };
  13. struct mod_arch_specific
  14. {
  15. /* Starting offset of got in the module core memory. */
  16. unsigned long got_offset;
  17. /* Starting offset of plt in the module core memory. */
  18. unsigned long plt_offset;
  19. /* Size of the got. */
  20. unsigned long got_size;
  21. /* Size of the plt. */
  22. unsigned long plt_size;
  23. /* Number of symbols in syminfo. */
  24. int nsyms;
  25. /* Additional symbol information (got and plt offsets). */
  26. struct mod_arch_syminfo *syminfo;
  27. };
  28. #ifdef __s390x__
  29. #define ElfW(x) Elf64_ ## x
  30. #define ELFW(x) ELF64_ ## x
  31. #else
  32. #define ElfW(x) Elf32_ ## x
  33. #define ELFW(x) ELF32_ ## x
  34. #endif
  35. #define Elf_Addr ElfW(Addr)
  36. #define Elf_Rela ElfW(Rela)
  37. #define Elf_Shdr ElfW(Shdr)
  38. #define Elf_Sym ElfW(Sym)
  39. #define Elf_Ehdr ElfW(Ehdr)
  40. #define ELF_R_SYM ELFW(R_SYM)
  41. #define ELF_R_TYPE ELFW(R_TYPE)
  42. #endif /* _ASM_S390_MODULE_H */