This is the mail archive of the
mailing list for the binutils project.
Exporting only symbols specified by dynamic-list
- From: Vyacheslav Ostapenko <ostap73 at gmail dot com>
- To: binutils at sourceware dot org
- Date: Sun, 16 Feb 2014 02:26:37 -0500
- Subject: Exporting only symbols specified by dynamic-list
- Authentication-results: sourceware.org; auth=none
I have pretty big project, which links together several static libs
including our own and 3rd party into shared library.
I need to export only few symbols that are defined in our own static
libraries. The problem that 3rd party libraries have also declare
__attribute__ ((visibility ("default"))) and those symbols get
I see that ld (gold and bfd) have --dynamic-list option which allows
making a file with a list of functions that should be exported.
The question is: How to hide all other exports?
It seems that "exclude-libs" option has priority over "dymanic-list"
and hides all symbols from static libraries. Of course we could
maintain list of libs which should be removed from exports, but we
prefer to have generated "dynamic-list" with all other exports
"no-export-dynamic" has no effect and all symbols with default
visibility get exported.
What else can I try?