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
- c++ - What do linkers do? - Stack Overflowstackoverflow.com
- A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linuxmuppetlabs.com
- 你真的需要 Webpack DllPlugin 吗? - 卤蛋实验室cnblogs.com
- The "Basics" | Putting the "You" in CPUcpu.land
- DLL hell - Wikipediaen.wikipedia.org
- lecture11web.stanford.edu
- Inter-process communication in Linux: Shared storage | Opensource.comopensource.com
- ret2libc/ret2system | Cybersecurity Notesir0nstone.gitbook.io
- It’s Time for a Modern Synthesis Kernel – Embedded in Academiablog.regehr.org