Linkers part 4 – Airs – Ian Lance Taylor
We’ve talked a bit about what object files and executables look like, so what do shared libraries look like? I’m going to focus on ELF shared libraries as used in SVR4 (and GNU/Linux, etc.), as they are the most flexible shared library implementation and the one I know best. Windows shared libraries, known as DLLs, are less flexible in that you have to compile code differently depending on whether it will go into a shared library or not. You also have to express symbol visibility in the source code. This is not inherently bad, and indeed ELF has picked up some of these ideas over time, but the ELF format makes more decisions at link time and is thus more powerful. When the program linker creates a shared library, it does not yet know which virtual address that shared library will run at. In fact, in different processes, the same shared library will run at different address, depending on the decisions made by the dynamic linker. This means that shared library code must be position indep
Linkers part 4 – Airs – Ian Lance Taylor Linkers part 4 Shared Libraries We’ve talked a bit about what object files and executables look like, so what do shared libraries look like? I’m going to focus on ELF shared libraries as used in SVR4 (and GNU/Linux, etc.), as they are the most flexible shared library implementation and the one I know best. Windows shared libraries, known as DLLs, are less flexible in that you have to compile code differently depending on whether it will go into a shared library or not. You also have to express symbol visibility in the source code
related reading
- Linkers part 2 – Airs – Ian Lance Taylorairs.com
- Linkers part 3 – Airs – Ian Lance Taylorairs.com
- How to execute an object file: Part 1blog.cloudflare.com
- A Gentle Introduction to LLVM IR · mcyoungmcyoung.xyz
- References and Borrowing - The Rust Programming Languagedoc.rust-lang.org
- What Every Programmer Should Know About Memorypeople.freebsd.org
- c++ - What do linkers do? - Stack Overflowstackoverflow.com
- A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linuxmuppetlabs.com
- The Lost Art of Structure Packingcatb.org
- Untangling Lifetimes: The Arena Allocator - by Ryan Fleurydgtlgrove.com
- 你真的需要 Webpack DllPlugin 吗? - 卤蛋实验室cnblogs.com
- Intrusive linked lists - Data structures in practicedata-structures-in-practice.com