View Single Post

   
  #9 (permalink)  
Old 01-05-2008, 08:01 AM
Gary R. Hook
 
Posts: n/a
Default Re: shared libraries in AIX

rs.canada@gmail.com wrote:
> .a = static library -- linker copies code into executable
> .so = shared (dynamic) library
>


As Lawrence stated, this is incorrect. Conventionally speaking,
an archive has an extension of ".a"; it can be used to collect
files of any type. Conveniently, it has been used to contain
object code (with supporting symbol tables), and the linker knows
how to access it.

On AIX, archives can contain both static and dynamic object code.
It's still an archive, but the linker will either pull out static
object code (as required) or create references to dynamic object
files (which we like to call "modules" on AIX). There's a
naming convention for these archive members (shr.o, etc) but
there's no requirement that they be named thusly. You can also
name a shared module "libfoo.a" on AIX, and the linker will
do the right thing. That doesn't make it an archive, however.

You can also have shared modules be separate files, and use
".so", ".dll", or whatever for a suffix. And use
-blibsuff:<extension> when linking to tell the linker how to
interpret -l options.

I think there's so more info in
http://www.ibm.com/developerworks/es...dfs/aix_ll.pdf

HTH
Reply With Quote