Library Organization - HACKT CHPSIM Manual
Description: HACKT CHPSIM Manual

Previous: Function Renaming, Up: Standard Library Functions

### 6.4 Library Organization

The intentional separation between `libstdchpfn.la` and `stdchpfn.la` demonstrates how one can build a `chpsim` module on top of an existing C or C++ library without modifying it.

Q: When passing a module to `chpsim` with `-l` or dlopen, how does the system know what dependent libraries to load? A: The `.la` Libtool archives encode library dependencies for shared libraries, and (Libtool) libltdl's lt_dlopen automatically takes care of dependent libraries for the user.