Re: Creating C++ loadable modules for AIX: ANSWER Ron wrote:
> "Gary R. Hook" <nospam@nospammers.net> wrote in message news:<4xpDb.908$Ap5.335929443@newssvr11.news.prodi gy.com>...
>
>>>First of all, if we want the module to access main's symbols, we must
>>>use the runtime linker.
>>
>>Or use "." imports to your module. This special symbol means that
>>the symbol is provided by (exported from) the main application.
>
> Can you explain how to do this?
Requires an import list and the -BI:<import_file> option. You
can use this same file as an export list when building the main application.
If you have symbol "foo" exported from main, and your module needs
it, the import list look like:
foo.exp
-------
#!.
foo
-------
The main app is built with the -bE:foo.exp option, and the module
is built with the -bI:foo.exp. Use dump -HTv on the main app
and the module to verify, if you like.
> Also, are there any disadvantages to using the runtime linker?
Speed at exec and load time (some additional overhead). Issues
if your application hasn't been architected for gracefully
handling multiple instances of symbols. There are a number of
folks that use this function successfully, tho, so feel free.
--
Gary R. Hook / AIX PartnerWorld for Developers / These opinions are MINE
__________________________________________________ ______________________ |