> Question 1: Isn't the line then in confusing in i386/crt/_rtboot.s
>
> jmp  *%eax  // transfer control to ld.so.1
>
> It should have been // transfer control to libc.so.1

No. libc.so.1 loads ld.so.1 and then jumps to it. libc.so.1 only
acts as an interpretor - it really passes control to ld.so.1.

> How does then Dynamic linker gets loaded by exec, which then transfers
> control to the executable, and if there are dynamic sections/relocations
> in the executable dynamic linker resolves that ?

exec() loads the executable.
exec() inspects the executable to find the interpretor name.
exec() loads the interpretor.
exec() jumps to the interpretor.

the interpretor loads the executables dependencies, relocates any
loaded objects, and then jumps to the executable.

--
Rod.
 
 
This message posted from opensolaris.org

Reply via email to