Preferences

How do I learn about what’s being discussed here? Why do I need a linker?

John R. Levine’s book Linkers and Loaders remains the only comprehensive coverage on the topic. You can get the manuscript proofs for free on the author’s website:

https://www.iecc.com/linker/

The Solaris Linkers and Libraries docs are very good and mostly relevant to Linux, with fewer distractions about Windows:

https://docs.oracle.com/cd/E37838_01/html/E36783/index.html

I would argue reading mold's source code is much easier and simplier to understand.
Than Levine’s book? You would lose the argument.
nope, read both, mold was easier. even if I am a perl master.
Here is a video presentation from Apple about the topic: https://developer.apple.com/videos/play/wwdc2022/110362

It has an introduction section on what is a linker and why you need one. The gist is, linker is the piece of software that puts together different source file, be it at compile time or runtime. So, the faster is your linker the quicker the app compiles and opens.

Individual compilation units (ex: .o files built from .c files) hold references (ex: from .h files) to other compilation units. In order to assemble a full executable, a linker takes all these individual units and links them together.
To assemble executable code from separately compiled files. Or to tell your executable code from where other executable code it needs can be loaded at runtime.

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal