Creating a DLL with IPA

This section gives several examples, which describe the aspects of building a simple DLL, as well as how to use some of the advanced IPA features to build a faster DLL. By default, IPA will try to remove unused code and variables (even global variables). In DLL situations, (or with exported variables) this ability becomes limited. For modules with a main function, IPA can build a function call tree and determine which functions are or may be called. This list of functions is used to remove unused functions and variables. For DLLs, IPA must treat the list of exported functions as potential entry points, and all exported variables as used. For this reason, the use of the EXPORTALL compiler option is not recommended. IPA provides a control file option that allows you to specify exactly which functions and variables you want to be exported. This gives the programmer who cannot change the source another way to avoid EXPORTALL. For an example of this, please see Example 2. using the IPA control file.