4 ms·
I needed to understand linkers and object loaders for something at work recently, and I can't recommend Computer Systems: A Programmer's Perspective enough![1]
by jez 6y ago
I needed to understand linkers and object loaders for something at work recently, and I can't recommend Computer Systems: A Programmer's Perspective enough![1] It answered a lot of questions I'd always had about computer systems.
I jumped straight into Chapter 7: Linking and learned so much that I read a bunch of other chapters for the fun of it. E.g., Chapter 7 covered that the `_start` symbol mentioned in this post is just a symbol in your executable that the Linux executable loader knows to jump to, but it's not the only special symbol!
The chapter on linking also covered how loading and linking dynamic/shared libraries works, which was also really cool. I wrote up some of the things I learned about that stuff too.[2]
[1] http://www.csapp.cs.cmu.edu/ http://www.csapp.cs.cmu.edu/
[2] https://blog.jez.io/linkers-ruby-c-exts/ https://blog.jez.io/linkers-ruby-c-exts/
- brandmeyer 6y agoAlong the same vein, "How to Write Shared Libraries" by Ulrich Drepper goes into much more detail than you might expect given the title. https://www.akkadia.org/drepper/dsohowto.pdf https://www.akkadia.org/drepper/dsohowto.pdf