This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Exporting only symbols specified by dynamic-list


Hi,

  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
exported.

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
excluded.

"no-export-dynamic" has no effect and all symbols with default
visibility get exported.

What else can I try?

Thanks,
  Slava


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]