3

In modern compiler toolchains, how are dynamically linked libraries implemented? Do they have any kind of internal architecture that optimizes the linking process? If I wanted to write my own dynamic library builder and/or dynamic linker, where would I begin?

I've been writing C/C++ for several years on both Windows and Linux and today I realized that I have basically no knowledge of this important tool in modern operating systems.

pg1989
  • 1,010
  • 6
  • 13
  • 2
    My personal opinion is that this question is a little too broad for StackOverflow. It's a grey area, so I'll let other members weigh in too. It may be better if you could modify your question to ask about one specific aspect of linking, then create separate questions about the other elements. – Polynomial Dec 01 '11 at 20:34
  • You would begin by reading the appropriate specifications, of course. For Linux, it would be the ELF gABI + your target processor's specific ELF psABI. – ninjalj Dec 01 '11 at 21:06
  • 2
    Or start from reading good books, e.g. "Linkers and loaders" (http://books.google.com/books?id=Id9cYsIdjIwC or http://www.iecc.com/linker/ ) – osgx Dec 02 '11 at 03:17

1 Answers1

0

You should try Ulrich Drepper's manual How to write shared libraries

kayrick
  • 187
  • 4