daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest Jan 15th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cc -Wall -Werror -g -c -o lwp.o lwp.c
  2. lwp.c: In function ânew_intel_stackâ:
  3. lwp.c:120: error: expected expression before â.â token
  4. lwp.c:122: error: expected expression before â.â token
  5. lwp.c:124: error: expected expression before â.â token
  6. lwp.c:126: error: expected expression before â.â token
  7. lwp.c:130: error: expected expression before â.â token
  8. lwp.c:132: error: expected expression before â.â token
  9. lwp.c:134: error: expected expression before â.â token
  10. lwp.c:136: error: expected expression before â.â token
  11. lwp.c:138: error: expected expression before â.â token
  12. lwp.c:140: error: expected expression before â.â token
  13. lwp.c:142: error: expected expression before â.â token
  14. make: *** [lwp.o] Error 1
  15.    
  16. /* make ourselves a nice intuitive "push()" macro */
  17. #define push(sp,val) (*(..sp)=(unsigned)(val))
  18.  
  19. unsigned long *new_intel_stack(unsigned long *sp,lwpfun func, void *arg) {
  20.     unsigned long *ebp;
  21.     push(sp,arg); /* argument */
  22.     push(sp,lwp_exit); /* for lwp return purposes */
  23.     push(sp,func); /* function's return address */
  24.     push(sp,0x1abcdef1); /* bogus "saved" base pointer */
  25.     ebp=sp; /* remember sp from this point for later */
  26.     push(sp,0x6c6f7453); /* push initial eax, ebx, ecx, edx, esi and edi -- bogus */
  27.     push(sp,0x66206e65);
  28.     push(sp,0x206d6f72);
  29.     push(sp,0x746e6957);
  30.     push(sp,0x32207265);
  31.     push(sp,0x21363030);
  32.     push(sp,ebp); /* push initial edp */
  33.     return sp;
  34. }
  35.    
  36. (*(..sp)=(unsigned)(val))
  37.    
  38. #define push(sp,val) (*(--sp)=(unsigned)(val))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top