If you believe that main()
is the first bit of code that gets to run, and ever wondered how globals are initialized then, this article is just for you: http://dbp-consulting.com/tutorials/debugging/linuxProgramStartup.html
Now I need to find something about dynamic linkers and what happens between mmapping an ELF into memory and calling _start
. Any pointers?
@minoru Linkers and Loaders
@minoru the source code for ld-linux.so might just help
@minoru: I know it's not _exactly_ the same topic, but have you seen Lexi Mattick's breakdown of "launching a new process on Linux-based systems?" It's at https://cpu.land/ and it's very impressive.