Library extension .a/.so

David Thornton david-FkEgs2FKm2NvBvnq28/GKQ at public.gmane.org
Tue Apr 26 21:41:19 UTC 2005


Francois Ouellette 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.
>>>      
>>>
>>type 'file somelib.so someother.a' and see
>>
>>Peter
>>    
>>
>
>More specefically, a .a file is an archive containing 1 or more object
>module(s) that can become part of an executable that gets created with ld.
>
>A .so is an executable without a start address, made of 1 or more program
>module(s) that can be "called" at run time by an executable program
>(analogy with a DLL in W$).
>
>Hope this helps,
>
> François Ouellette
><fouellet-cpI+UMyWUv9BDgjK7y7TUQ at public.gmane.org>
>--
>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
>  
>
I was pretty sure that this has something to do with gcc and or ar ( the 
archive tool).

So I maned those guys:

Also I googled a bit...

http://docsun.cites.uiuc.edu/sun_docs/C/solaris_9/SUNWdev/LLM/p21.html

what you might try doing is looking atthe Makefile that was used to 
create the .a file and then adjust slightly to get a .so file.

 From the ar man page:

You may use `nm -s' or `nm --print-armap' to list this index table.  If 
an archive lacks the table, another form of ar called ranlib  can be 
used to add just the table.

Hope this give you a little push in the right dirrection.

david







-- 
Let one walk alone,
commiting no sin with few wishes,
like and elephant in the forest.
-- ghost in the shell 2: Innocence

--
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