module.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef _ASM_MODULE_H
  2. #define _ASM_MODULE_H
  3. #include <linux/config.h>
  4. #include <linux/list.h>
  5. #include <asm/uaccess.h>
  6. struct mod_arch_specific {
  7. /* Data Bus Error exception tables */
  8. struct list_head dbe_list;
  9. const struct exception_table_entry *dbe_start;
  10. const struct exception_table_entry *dbe_end;
  11. };
  12. typedef uint8_t Elf64_Byte; /* Type for a 8-bit quantity. */
  13. typedef struct
  14. {
  15. Elf64_Addr r_offset; /* Address of relocation. */
  16. Elf64_Word r_sym; /* Symbol index. */
  17. Elf64_Byte r_ssym; /* Special symbol. */
  18. Elf64_Byte r_type3; /* Third relocation. */
  19. Elf64_Byte r_type2; /* Second relocation. */
  20. Elf64_Byte r_type; /* First relocation. */
  21. Elf64_Sxword r_addend; /* Addend. */
  22. } Elf64_Mips_Rela;
  23. #ifdef CONFIG_MIPS32
  24. #define Elf_Shdr Elf32_Shdr
  25. #define Elf_Sym Elf32_Sym
  26. #define Elf_Ehdr Elf32_Ehdr
  27. #endif
  28. #ifdef CONFIG_MIPS64
  29. #define Elf_Shdr Elf64_Shdr
  30. #define Elf_Sym Elf64_Sym
  31. #define Elf_Ehdr Elf64_Ehdr
  32. #endif
  33. #ifdef CONFIG_MODULES
  34. /* Given an address, look for it in the exception tables. */
  35. const struct exception_table_entry*search_module_dbetables(unsigned long addr);
  36. #else
  37. /* Given an address, look for it in the exception tables. */
  38. static inline const struct exception_table_entry *
  39. search_module_dbetables(unsigned long addr)
  40. {
  41. return NULL;
  42. }
  43. #endif
  44. #endif /* _ASM_MODULE_H */