Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between a shared object and a dll

I have a library which at compile time is building a shared object, called libEXAMPLE.so (in the so.le folder), and a dll by the name of EXAMPLE.so (in the dll folder). The two shared objects are quite similar in size and appear to be exactly the same thing. Scouring the internet revealed that there might be a difference in the way programs use the dll to do symbol resolution vs the way it is done with the shared object.

Can you guys please help me out in understanding this?

like image 820
Falcata Avatar asked Nov 08 '12 18:11

Falcata


People also ask

What is a shared object?

A shared object is an indivisible unit that is generated from one or more relocatable objects. Shared objects can be bound with dynamic executables to form a runable process. As their name implies, shared objects can be shared by more than one application.

Is a DLL a shared library?

A Dynamically Linked Library (DLL) is a library that can be shared by several applications running under Windows. A DLL can contain any number of routines and variables. One advantage of DLLs is that you can change and enhance them without forcing all the applications that depend on them to be relinked or recompiled.

Is .so a dynamic library?

Shared libraries are also called dynamic libraries. These shared libraries are linked in at runtime by the dynamic linker available on the operating system. Shared libraries usually end with the . so extension — an example is libboost.5.6.so.

Is DLL an object?

The DLL object contains methods and properties that allow scripts to call routines from dynamic link libraries.


1 Answers

"DLL" is how windows like to name their dynamic library

"SO" is how linux like to name their dynamic library

Both have same purpose: to be loaded dynamically.

Windows uses PE binary format and linux uses ELF.

PE: http://en.wikipedia.org/wiki/Portable_Executable

ELF: http://en.wikipedia.org/wiki/Executable_and_Linkable_Format

like image 199
MasterID Avatar answered Sep 30 '22 15:09

MasterID