Wednesday 

Room 3 

10:20 - 11:20 

(UTC+02

Talk (60 min)

From Program to Process - What Happens After the Compiler

We all know roughly what the compiler does, it translates your source code into machine code. Thanks to Compiler Explorer, many of us now even look at the generated Assembly code. But wait a minute, that code is full of labels and function names, the CPU knows of no such things! Most of these are also defined in different compilation units, how can we jump to code we don't know where comes from? And even for our own compilation unit, how can the compiler know where in memory the machine code will eventually be loaded, so it can generate the right jumps? Even worse, what if that function comes from a dynamic shared object? This talk gives an introduction to how the compiler, linker, loader and operating system cooperates to get from a compilation unit to a running process. We'll look at static and dynamic linking, relocations, position independent code, sections and segments and virtual memory. The talk covers Linux only, but similar principles apply on Windows and Mac.

C++
C

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 principal engineer at Ascenium in Oslo, working on a new CPU design. He's also the author of http://cppquiz.org and the blog C++ on a Friday.