This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Shared Objects and Dynamic Link Libraries
- To: Soubhik Bhattacharya <soubhik at cse dot iitk dot ac dot in>
- Subject: Re: Shared Objects and Dynamic Link Libraries
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 04 Jun 2001 09:57:26 -0700
- Cc: binutils at sources dot redhat dot com
- References: <Pine.LNX.4.21.0106031439120.6805-100000@cseproj22.cse.iitk.ac.in>
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