execve system call

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

execve system call

NeoJia
hi,

I am trying to figure out the system call from user space to kernel
space. So, I read glibc wrapper first. But I cannot figure out the
exact meaning of INTERNAL_SYSCALL for execve system call on IA32 arch.
In this macro, which function will be called by the following assmebly
code ""call *%%gs:%P2\n\t"?

Is there anyone can help me clarify it?

Thanks,
Neo

--
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!
Reply | Threaded
Open this post in threaded view
|

Re: execve system call

Carlos O'Donell-2
On 3/26/07, Neo Jia <[hidden email]> wrote:
> hi,
>
> I am trying to figure out the system call from user space to kernel
> space. So, I read glibc wrapper first. But I cannot figure out the
> exact meaning of INTERNAL_SYSCALL for execve system call on IA32 arch.
> In this macro, which function will be called by the following assmebly
> code ""call *%%gs:%P2\n\t"?
>
> Is there anyone can help me clarify it?

Yes.

1. Build the library
2. Look at the disassembled output for execve using objdump -ldr.

I would also recommend that you familiarize yourself with the GNU
Assembler http://sourceware.org/binutils/docs-2.17/as/index.html

Cheers,
Carlos.