patraulea
patraulea

Reputation: 916

After vfork(), how does the linker resolve execve() without clobbering parent memory?

If the execve@plt contains the stub that calls into the linker, is the process of resolving the address of execve guaranteed to not modify any of the parent's memory ?

Upvotes: 2

Views: 78

Answers (1)

Employed Russian
Employed Russian

Reputation: 213799

If the execve@plt contains the stub that calls into the linker

It doesn't call into the (staic) linker. It calls into the runtime loader (aka dynamic linker).

is the process of resolving the address of execve guaranteed to not modify any of the parent's memory ?

On the contrary: it will update the processes' GOT table1, before calling the execve system call wrapper in libc.so.6.


1 Assuming lazy PLT resolution is in effect and execve has not already been resolved.

Upvotes: 1

Related Questions