#include <stdio.h> char inc[] __attribute__((section(".text"))) = { 0x55, 0x89, 0xe5, 0xff, 0x45, 0x08, 0x8b, 0x45, 0x08, 0xc9, 0xc3 }; typedef int (*incr)(int); int main() { int x = ((incr)inc)(0); printf("b=%d\n", x); return 0; } |
歡迎光臨 Chinaunix (http://www.72891.cn/) | Powered by Discuz! X3.2 |