Wednesday

Room 2

10:15 - 11:15 (UTC+02)

Talk (60 min)

How to start a program

You've managed to compile and link your program, but how do you start it? Well, you simply run the executable of course, but what actually happens when you do that? How are your variables initialised, and by the way, which of them even are initialised, and why? How do you get to main() in the first place? How is it possible to call a function from a shared object, when the linker doesn't know where in memory it will be loaded? What even _is_ a program? What does it look like on disk and in memory? This talk is specifically about what happens on Linux/ELF. Similar principles apply on Windows/COFF, but they solve some of these problems in a different way. All code examples are in C++, mostly in the C subset. The talk can be seen as a part two to my talk "From Program to Process - What Happens After The Compiler" from last year.

C++
C
Platform

Anders Schau Knatten

Anders started programming in Turbo Pascal in 1995, and has been programming professionally in various languages since 2001. He's currently a senior developer at Zivid, making 3D cameras for robot vision. He's the author of cppquiz.org and the blog C++ on a Friday.