How to export specific symbol from executables in GNU/Linux

前端 未结 1 2009
傲寒
傲寒 2021-01-14 07:43

While loading dynamic libraries by ::dlopen(), exporting symbols from executables can be done by -rdynamic option, but it exports all the symbols o

1条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-14 08:15

    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.

    0 讨论(0)
提交回复
热议问题