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

67 views Asked by At

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 ?

1

There are 1 answers

1
Employed Russian On BEST ANSWER

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.