While loading dynamic libraries by ::dlopen()
, exporting symbols from executables can be done by -rdynamic
option, but it exports all the symbols o
Is there a way to export just specific function(s)?
We needed this functionality, and added --export-dynamic-symbol
option to the Gold linker here.
If you are using Gold, build a recent version and you'll be all set.
If you are not using Gold, perhaps you should -- it's much faster, and has the functionality you need.