Strange instructions in compiler output

chungwei Hsiung chsiung2 at buffalo.edu
Sat Mar 6 13:04:37 PST 2004


OH.... yes...
this is FreeBSD not linux, I will try it on the linux box later
thank you for the clarification, but how does FreeBSD know where the passed arguments are?? just out of curiosity..

thanks again
Chungwei


On Sat, 06 Mar 2004 21:47:10 +0100
des at des.no (Dag-Erling Smørgrav) wrote:

> chungwei Hsiung <chsiung2 at buffalo.edu> writes:
> > I still don't understand it because we are supposed to pass in the
> > op code 0xb to %eax, and arguments to %ebx, %ecx, and %edx before
> > calling interupt, but I can't see any of those instruction
> > anywhere. Did I miss anything?
> 
> Huh?  Arguments are passed on the stack, and execve() is syscall 59
> (0x3b as you can see in the disassembly).  What gave you the idea that
> we were passing arguments in registers?  This isn't DOS, you know...
> 
> DES
> -- 
> Dag-Erling Smørgrav - des at des.no
> 


More information about the freebsd-hackers mailing list