Important: The information in this document is obsolete and should not be used for new development.
Use Reexport Libraries
A developer can split the functionality of a library into several libraries (for example, to reduce size or to isolate certain services). By using reexport libraries, older clients can use multiple newer libraries in place of an older one.For example, say you have a library
dogCowLib
which has been split into two librariesdogLib
andcowLib
. Older clients still expect to import symbols fromdogCowLib
, so you must provide one. The new version ofdogCowLib
contains no code, however, but merely imports symbols fromdogLib
andcowLib
and reexports them as its own. Figure 3-5 shows the use of a reexport library.Figure 3-5 Using a reexport library
When the Code Fragment Manager performs relocations,
dogCowLib
is optimized out, with the result that symbol pointers point directly todogLib
orcowLib
. Figure 3-6 shows the old client linked to the new libraries at runtime.Figure 3-6 The reexport library removed at runtime
More generally, a developer can use reexport libraries to link against a collection of libraries that do not exist as real implementations. For example, you can group symbols in arbitrary libraries according to functionality during the build process and then use a reexport library at runtime to assign these symbols to the actual implementation libraries.
A drawback to using reexport libraries is that the client application receives all the connections associated with a reexport library even if they are not needed. In Figure 3-5, for example, even if the client application does not need any symbols in
dogLib
, the Code Fragment Manager prepares it anyway, sincedogCowLib
requires it.