strange, I attached your code to the end, still get seg-fault.

來源: 2006-08-02 13:30:53 [舊帖] [給我悄悄話] 本文已被閱讀:

... ...
xorl %eax, %eax
incl %eax
xorl %ebx, %ebx
# movl $1, %eax
# movl $0, %ebx
# int $0x80
The commented code are my original 'exit' call. I guess they are equivalent to yours, right? Anyway, this time i used your code, and run it by both GCC and as + ld, the result stays the same, segmentation fault occurs. Any ideas?
Oh, dear. linux is such mystirious world for me..
Thanks very much for looking into the situation.