Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Linking static libraries into a shared library: how to hide their symbols

Brian VandenbergNov 6 2014 — edited Nov 7 2014

I'm not sure it needs much more explanation than what the subject says.  Here's an example:

~ CC ${LINK_FLAGS} ${LIST_OF_OBJECTS} -Wl,-Bstatic -lboost_regex -Wl,-Bdynamic -shared -o libblah.so

~ gnm -Aa --defined-only libblah.so | ggrep boost | ggrep regex | ghead -n1

libblah.so:000d8744 t _GLOBAL__sub_D__ZN5boost11regex_errorC2ERKSsNS_15regex_constants10error_typeEi

I don't want my library to be able to satisfy boost's dependencies.

-Brian

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 5 2014
Added on Nov 6 2014
4 comments
2,563 views