This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Shared Objects and Dynamic Link Libraries


Soubhik Bhattacharya <soubhik@cse.iitk.ac.in> writes:

> i have to ask something which is very trivial to many of you...
> what is the basic difference between shared objects and dynamic link
> libraries (if there's any)? it'll be highly appreciated if you refer me to
> good online documentations for libraries, linkers and binary formats
> (relocatable, static, shared, elf, coeff, a.out etc etc).....

Your question is somewhat vague.  I will provide some general
information.

``Shared object'' is a term often used with ELF.  It means the same
thing as ``shared library.''  ``Dynamic link library'' is a term often
used with Windows.  It also means the same thing as ``shared
library.''

There are differences between the ELF and Windows implementations of
shared libraries.  Basically, the Windows implementation is more
primitive: it requires using different source code for references to
global variables, depending upon whether they are referenced in the
main program or in a shared library.  Windows also does not support
overriding a function defined in a shared library from the main
executable.  The only advantage of the Windows approach that I can
think of is that it saves an instruction or two per function call
within a shared library.

I am not aware of any single source for online documentation of
libraries, linkers, and binary formats.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]