Reading QuestionsRemember to submit your answer to this quetion before the next class.
Compile this program on your machine with gcc (make sure you are using
the pre-installed gcc version 4.3.3)
#include <stdio.h> int main () { int i; __asm__ volatile("movl %ebp, 4(%esp)"); printf ("%%ebp = %08x\n"); return 0; }Then run this program 5 times. What are the outputs? Whether or not they are the same value? Why it's much more difficult to apply Alphe One's method to attack this program? If you are not familar with gcc inline assembly, read this article. |