There is static linkage, dynamic linkage. What is type where it imports compiled functions from a library and compiles it into the binary?
Asked
Active
Viewed 43 times
-2
-
Maybe you speak of Link-Time Optimization, which is not a linkage thing (but a compiler thing). – Basile Starynkevitch Sep 19 '14 at 20:20
-
http://en.wikipedia.org/wiki/Static_build – Lynn Crumbling Sep 19 '14 at 20:21
-
Read Levine's book [Linkers and Loaders](http://www.iecc.com/linker/) – Basile Starynkevitch Sep 19 '14 at 20:23
-
@BasileStarynkevitch That's actually a reference in the wikipedia article. – Lynn Crumbling Sep 19 '14 at 20:26
-
C only knows about internal (static) and external linkage. The latter is what you are talking about. – Hans Passant Sep 19 '14 at 20:34
1 Answers
2
In static linking, the compiled functions are stored into the executable or dynamic library (if you're creating one).
In dynamic linking, the compiled function is stored in a separated library (DLL in Windows or shared object in Linux). A small piece if code is added to the executable to load that shared library at runtime and map the public functions and variables within it.

egur
- 7,830
- 2
- 27
- 47