An open API service indexing awesome lists of open source software.

https://github.com/bollu/linker-koans

Snippets that explore how linkers work, one flag at a time.
https://github.com/bollu/linker-koans

Last synced: 8 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# 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.