2.8. Creating shared objects
This section explains how to create shared objects on AIX. Once shared objects are created, you can archive them into a library using the ar command (see 2.2.2, “Objects and libraries” on page 45).
In order to create a shared object, the following tasks are required:
Compile the source code files and create object files. Use the appropriate compiler driver to do so, for example, cc -c foo.c.
Create an export file to explicitly control exported symbols from the shared object, which you are going to create.
Re-link the created object file(s) to a shared object file. It is possible to combine multiple object files into a single shared object file. The following linker options are used in this step: