Advertisement
SciresM

spider.h

Jan 24th, 2015
772
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1. #ifndef _SPIDER_H
  2. #define _SPIDER_H
  3.  
  4. #define START_SECTION __attribute__ ((section (".text.start"), naked))
  5.  
  6. // make sure code is PIE
  7. #ifndef __PIE__
  8. #error "Must compile with -fPIE"
  9. #endif
  10.  
  11. int (*svcSleepThread)(unsigned long long nanoseconds) = (void *)0x0023FFE8;
  12.  
  13. int uvl_entry();
  14. int uvl_exit (int status);
  15.  
  16. // TODO: move out into .c file
  17. int START_SECTION uvl_start() {
  18.     __asm__ volatile (".word 0xE1A00000");
  19.     uvl_entry();
  20.     __asm__ volatile ("bx lr");
  21. }
  22.  
  23. // TODO: move out into .c file
  24. int uvl_exit(int status) {
  25.     return 0;
  26. }
  27.  
  28.  
  29. #endif /* _SPIDER_H */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement