Section 5.6. AIX Versus Linux Shared Library Creation

5.6. AIX Versus Linux Shared Library Creation

Although all UNIX implementations provide the same general linking and loading functionality, subtle differences do exist in how they are created. In AIX, shared libraries can be an object file or an archived file member. An archived library can contain multiple members, some of which are shared modules and some ordinary object files. In addition, under AIX, after you have built a shared library, the library is ready for use. This is not so in Linux.

In Linux, shared libraries contain only ordinary object files and archives. And a shared library cannot be a member of an archive. In addition, one major difference between AIX and Linux is that in Linux after you have your library built, as a final step you must run your library through a versioning tool that links it to a version number. Only then will your library be ready for use.

If you are accustomed to the way AIX builds libraries, Linux library versioning will be a new concept for you. Library versioning is discussed in detail in Chapter 3. AIX users must make sure they fully understand the section in Chapter 3 on Linux library versioning and implement library versioning in all shared libraries to be ported to Linux.

UNIX to Linux Porting. A Comprehensive Reference
UNIX to Linux Porting: A Comprehensive Reference
ISBN: 0131871099
EAN: 2147483647
Year: 2004
Pages: 175 © 2008-2017.
If you may any questions please contact us: