Re: Strange instructions in compiler output (was: A simple question)

2004-03-06 Thread Anthony Schneider
try compiling with the -static flag the gcc. then 'disassemble execve'. -Anthony. On Sat, Mar 06, 2004 at 02:26:51PM +, chungwei Hsiung wrote: > Hello everyone > Thanks for fellows' previous helps. I actually have a further question. I read an > article that it says if I compile the follo

Re: Strange instructions in compiler output (was: A simple question)

2004-03-06 Thread chungwei Hsiung
Hello everyone Thanks for fellows' previous helps. I actually have a further question. I read an article that it says if I compile the following program #include int main(){ char *name[2]; name[0] = "/bin/sh"; name[1] = NULL; execve(name[0],name,NULL); return 0; } by gcc -o shellc

Strange instructions in compiler output (was: A simple question)

2004-03-05 Thread Greg 'groggy' Lehey
On Friday, 5 March 2004 at 13:43:04 -0500, Chungwei Hsiung wrote: > Hello.. > I am super new to this list, and I have a simple question that I don't > know why it does that. I have a simple test program. I compile it, and > gdb to disassemble main. I got the following.. > > 0x80481f8 : push