Library extension .a/.so

billt-lxSQFCZeNF4 at public.gmane.org billt-lxSQFCZeNF4 at public.gmane.org
Tue Apr 26 14:56:11 UTC 2005


One is a shared object (so) and thus is completely re-entrant. The other is an archive (a) and may or maynot be completely re-entrant.

A shared object is loaded into memory once and is used by any program that uses that object.

An archive is loaded in memory once per program using the library (this is exactly how a DLL in windows does it).

Finally if you are creating a staticly linked program you link in the parts of the archive. Some compilers will link in the whole archive, but I believe gcc only links in the functions that you are using.

Bill

On Mon, Apr 25, 2005 at 10:36:15PM -0400, Byron L. Sonne wrote:
> > What is the difference in libraries ending with extension .a and .so.
> > Can one convert  from somelib.a to somelib.so?
> 
> I'd like to know as well - I've tended to think that it's the difference 
> between static and dynamic, but upon reflection I don't have a good 
> reason for thinking that. Or if I did, I've forgotten it.
> --
> The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list