Preface
-
Application elf, such as a statically linked application, the entry function is not the main function, but
_start
the function -
From
_start
function to main function, after a series of initialization operations of libc -
_start
->_start_c
->...
->main
-
The dynamically compiled and linked application elf has gone through the loading and running process of
_dlstart
->_dlstart_c
->...
->_start
->_start_c
->...
->main
-
The purpose of this article: debug and sort out the process of application execution from the entry function to the user program main function
musl ldso entry function execution process
- musl libc.so
_dlstart
: The entry function of the application. Note that the operation of executing the entry function of musl ldso (that is, musl libc.so) is implemented by the kernel.
- Application entry function execution flow: Whether it is static link or dynamic link, it starts from