Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between dynamic linker and dynamic loader?

I know what a dynamic loader does. It loads programs as and when is requested by the application at run time thereby minimizing the memory foot print. But I am really not getting what is this dynamic linker? And what are its advantages? I read many online stuff but they are talking in abstract terms.

Can anyone explain me with some simple examples?

like image 353
Pavan Manjunath Avatar asked Apr 03 '12 07:04

Pavan Manjunath


1 Answers

They are really two terms for the same thing.

In the Unix world, the term dynamic linker is used to denote the component of the operating system which links dynamic libraries at runtime, whereas a loader on most other systems does both program loading and linking dynamic libraries.

Because loading libraries under Unix-like systems is done by a separate component (ld.so most often), a dynamic linker is considered something distinct from the program loader. Compilers usually insert some stub code in the beginning of the executable to load ld.so, and ld.so would continue loading the rest of the dependent libraries before main is invoked. While program loading is done in kernelspace, linking dynamic libraries is usually done in userspace.

This is unlike Windows, where both program loading and linking dynamic libraries is done in kernel mode.

like image 192
Blagovest Buyukliev Avatar answered Nov 09 '22 18:11

Blagovest Buyukliev