2.6. Dynamic loading

Dynamic loading is the process in which one can attach a shared library to the address space of the process during execution, look up the address of a function in the library, call that function, and then detach the shared library when it is no longer needed. It is implemented as an interface to the services of the dynamic linker. This gives programmers extra control in managing the memory allocated to the shared library segment in an effective manner.

The dlopen() family of subroutines is supported on the AIX operating system. The functions include:

  • dlopen()

  • dlclose()

  • dlsym()

  • dlerror()

dlopen()

The dlopen() subroutine is used to open a shared object, and dynamically map it into the running programs address space. The syntax ...

Get Developing and Porting C and C++ Applications on AIX now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.