vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| On 2005-11-28, smiletolead <developeratca@gmail.com> wrote: > Shared libraries in AIX have the extension .a. How is a static library > named in AIX. > Shared libraries have the extension of .so (shared object). Libraries used to compile applications have the extension .a (archive). Mike |
| |||
| "smiletolead" <developeratca@gmail.com> writes: > Shared libraries in AIX have the extension .a. How is a static library > named in AIX. Also with .a extension. On aix, shared library name (encoded into the Loader section) is a *combination* of library name + member name, and archive libraries can contain a mixture of "regular" and "shared" objects (and a mixture of 32 and 64-bit objects). For example, /usr/lib/libc.a contains: frexp.o - regular object itrunc.o - regular object shr.o - shared object .... frexp_64.o - regular 64-bit object itrunc_64.o - regular 64-bit object shr_64.o - shared 64-bit object. A 64-bit application would normally depend on "libc.a(shr_64.o)" shared library. Cheers, -- In order to understand recursion you must first understand recursion. Remove /-nsp/ for email. |
| |||
| "smiletolead" <developeratca@gmail.com> writes: > Are there static libraries in AIX? Depends on what you call a "static library". If you define it as "archive library" (i.e. manipulated by 'ar' and having a structure defined in /usr/include/ar.h), then /usr/lib/libc.a is a static library (containing shared objects inside). Other archive libraries, e.g. /usr/lib/libm.a contain no shared objects inside, and act almost exactly the same as archive libraries on other UNIX systems. Cheers, -- In order to understand recursion you must first understand recursion. Remove /-nsp/ for email. |
| |||
| rs.canada@gmail.com wrote: > .a = static library -- linker copies code into executable > .so = shared (dynamic) library No. Laurenz Albe |
| |||
| 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 |