clinkerglibcgotvfork

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 ?


Solution

  • 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.