kernel-offsets.h 368 B

12345678910111213141516171819
  1. #include <linux/stddef.h>
  2. #include <linux/sched.h>
  3. #include <linux/elf.h>
  4. #include <linux/crypto.h>
  5. #include <asm/mman.h>
  6. #define DEFINE(sym, val) \
  7. asm volatile("\n->" #sym " %0 " #val : : "i" (val))
  8. #define BLANK() asm volatile("\n->" : : )
  9. #define OFFSET(sym, str, mem) \
  10. DEFINE(sym, offsetof(struct str, mem));
  11. void foo(void)
  12. {
  13. #include <common-offsets.h>
  14. }