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.
- Host: GitHub
- URL: https://github.com/bollu/linker-koans
- Owner: bollu
- Created: 2023-08-20T20:34:45.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-20T22:53:23.000Z (about 2 years ago)
- Last Synced: 2024-12-25T17:18:53.090Z (9 months ago)
- Language: Makefile
- Size: 6.84 KB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README
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.