elf-randomize.h 544 B

12345678910111213141516171819202122
  1. #ifndef _ELF_RANDOMIZE_H
  2. #define _ELF_RANDOMIZE_H
  3. struct mm_struct;
  4. #ifndef CONFIG_ARCH_HAS_ELF_RANDOMIZE
  5. static inline unsigned long arch_mmap_rnd(void) { return 0; }
  6. # if defined(arch_randomize_brk) && defined(CONFIG_COMPAT_BRK)
  7. # define compat_brk_randomized
  8. # endif
  9. # ifndef arch_randomize_brk
  10. # define arch_randomize_brk(mm) (mm->brk)
  11. # endif
  12. #else
  13. extern unsigned long arch_mmap_rnd(void);
  14. extern unsigned long arch_randomize_brk(struct mm_struct *mm);
  15. # ifdef CONFIG_COMPAT_BRK
  16. # define compat_brk_randomized
  17. # endif
  18. #endif
  19. #endif