[asterisk-dev] Module to Asterisk function Compiler Issue question
Mike Myhre
digium at aeisecure.com
Mon Aug 1 09:52:33 CDT 2011
By default, functions are not exported from Asterisk modules other
than res_* modules. There are two factors controlling this: the
flags in the AST_MODULE_INFO macro call at the end of the module
source file, and the '.exports' file for the module in question. In
order to export symbols from a module, you'll need to modify these
areas to be similar to the way that res_* modules are configured.
I don't see any .exports file anywhere in the source files, so I am
guessing it doesn't apply. The AST_MODULE_INFO macro appears to handle
only constructor, destructor and a reload. There are hundreds of
functions similar to the one I am trying to export, yet mine never makes
it to the asterisk binary.
I can do objdumps on the chan_sip.so file and my functions are there. If
I do an objdump on the asterisk binary, I see all the other 'exported'
asterisk functions but not mine from the chan_sip.so file. I can't see
anything in the Makefile that would strip this out of force the others
to be exported. All the standard asterisk functions are in the .text
section as are my functions, so my earlier concern on class/section
wasn't valid.
So... Why aren't my functions making it from the .so file to the
asterisk binary? I would think that if they made it to the .so they
would make it to the final binary.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110801/aedd5cdf/attachment.htm>
More information about the asterisk-dev
mailing list