Jump to content
  • Advertisement
Sign in to follow this  
fir

does a dll much differ to a lib?

This topic is 2054 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

lib has some object code and import and export table

and dll is the same, though dll is able to be linked in 

runtime and lib do not

 

could maybe someone said what inner things in dll make

the difference and if this is heavy difference or not to much

 

would it to be hard to link to libs at runtime and what

changes in lib would be needed?
 

 

Share this post


Link to post
Share on other sites
Advertisement
Read those excellent articles.

Both static linking and dynamic linking provide a way for your program to access functions from a library. The two have different use cases.

In some ways they are very similar; they are both libraries. In some ways they are very different, both have clearly stated objectives that are solve completely different problems.

Neither one will provide the magic zero-cost performance optimizations you seem to be hunting for lately.

Share this post


Link to post
Share on other sites

I redded it (and do not find this articles excellent)

 

Those are not quite on topic, im asking for structural/

binary differences beetween dll and lib 

 

In first article there is an info that in exe you have

IAT (function pointers table that is filled by loader

in load time) this is some answer on my previous 

disasembly question but not the answer on structural/binary difference of dll over the lib files

 

(there is probably something more in dll than in lib butr what?)

 

Im not searching for zero-cost solutions here etc -

I am just  recently more interested in disasembly 

(esp in the topics related to linking [and loading] phase 

stuff on win32) [i think it is important to understand but

articles i was encountering are not to much comunicative

for me, maybe becouse weak english i got a bit more trouble

to read and understand some things there]

Edited by fir

Share this post


Link to post
Share on other sites
You can think of it this way:
A DLL is a library that is fully linked already. A LIB library is just a collection of object files that have not been run through a linker.

Share this post


Link to post
Share on other sites
lib files are basically collections of obj files. dll files use Portable Executable format which is modified from COFF format. obj files use COFF format. Wikipedia says "While extended versions of COFF continue to be used for some Unix-like platforms, primarily in embedded systems, perhaps the most widespread use of the COFF format today is in Microsoft's Portable Executable (PE) format. Developed for Windows NT, the PE format (sometimes written as PE/COFF) uses a COFF header for object files, and as a component of the PE header for executable files."

Share this post


Link to post
Share on other sites

lib files are basically collections of obj files. dll files use Portable Executable format which is modified from COFF format. obj files use COFF format. Wikipedia says "While extended versions of COFF continue to be used for some Unix-like platforms, primarily in embedded systems, perhaps the most widespread use of the COFF format today is in Microsoft's Portable Executable (PE) format. Developed for Windows NT, the PE format (sometimes written as PE/COFF) uses a COFF header for object files, and as a component of the PE header for executable files."

 

so both lib and dll are coffs... (?).. both has import and export tables od symbols... (?) what is the difference..

Share this post


Link to post
Share on other sites
You make it sound like the COFF format is simple. Out of curiosity I downloaded the specification from MS and it's like 100 pages long. It's likely that most of your answers will be there. Better get reading.

Share this post


Link to post
Share on other sites

You make it sound like the COFF format is simple. Out of curiosity I downloaded the specification from MS and it's like 100 pages long. It's likely that most of your answers will be there. Better get reading.

not useful answer (at all), also may be even misleading as you suggest that i should read coff specyfication to get answer - where there are much simpler ways as asking on the forum or at least searching through the tutorials

Edited by fir

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!