bollu / linker-koans

Snippets that explore how linkers work, one flag at a time.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

# Examples to play with the linker

This repo was born out of deep frustration in trying to understand
precisely how linkers work. The project contains folders,
each of which explores a *single* idea in the working
of the linker.


#### References:

- Airs - Ian Lance Taylor. Incredible blog post series by the author of `gold`.
  [Reference on symbol resolution](https://www.airs.com/blog/archives/49) is the only place
  I've ever seen this documented.

- Explanation of CRT files. This shows up when one tries to link a C executable manually.
  [Reference on the different `*crt*` files](https://dev.gentoo.org/~vapier/crt.txt).

- [Archive linking algorithm](https://web.archive.org/web/20180627210132/http://webpages.charter.net/ppluzhnikov/linker.html). This reference explains how the linker builds the graph of archives that are to be included in the final
  executable, as well as why the linker is order sensitive.

About

Snippets that explore how linkers work, one flag at a time.


Languages

Language:Makefile 74.9%Language:C 25.1%