Is there a .def file equivalent on Linux for controlling exported function names in a shared library?

后端 未结 4 801
独厮守ぢ
独厮守ぢ 2021-01-31 12:04

I am building a shared library on Ubuntu 9.10. I want to export only a subset of my functions from the library. On the Windows platform, this would be done using a module defini

4条回答
  •  鱼传尺愫
    2021-01-31 12:26

    Another option is to use the strip command with this way:

    strip --keep-symbol=symbol_to_export1 --keep-symbol=symbol_to_export2 ... \
         libtotrip.so -o libout.so
    

提交回复
热议问题