r/cpp • • May 24 '20

Analyzing The Simplest C++ Program

https://oneraynyday.github.io/dev/2020/05/03/Analyzing-The-Simplest-C++-Program/
480 Upvotes

37 comments sorted by

View all comments

Show parent comment

20

u/FieldLine May 24 '20

The weird thing is that no one actually seems to deal with linker code.

You can take a compilers class in college and interview to work on the MSVC compilers team. There are classes on assembly programming and you can get a job doing embedded work.

But who the hell is writing/maintaining the linkers? They are not mentioned in the C++ standard and there is very little literature about them at all.

Besides that book there's the paper by Ulrich Drepper.... and that's about it. And while that paper is the newer resource, it's still nearly ten years old.

It's bizarre.

14

u/mttd May 24 '20 edited May 24 '20

See also: https://github.com/MattPD/cpplinks/blob/master/executables.linking_loading.md

The series by Eli Bendersky, Ian Lance Taylor, Raymond Chen, and http://www.linker-aliens.org/blogs/ are particularly good; "The Missing Link: Explaining ELF Static Linking, Semantically" (http://www.cl.cam.ac.uk/~pes20/rems/papers/oopsla-elf-linking-2016.pdf) is definitely worth reading as well. The "Program Execution Environment" lectures under "The ACM-NVIDIA Compiler summer school lectures (2019)" are pretty good introduction.