There are a number of good reasons to switch to explicit export,
i.e. normal symbols use hidden visibility and exported symbols use default visibility.
- Windows compatibility
- less performance impact for PIC as only exported symbols require an indirection
- faster symbol lookup reduces the load time
- more possibilities for link time optimizations
- inlining visible functions breaks interposition
For a more detailed reading see
http://gcc.gnu.org/wiki/Visibilityhttp://www.akkadia.org/drepper/dsohowto.pdf
NB:
As of now libphobos2.so exports 14100 symbols and 87139 with unittests compiled in.
Comment #1 by robert.schadek — 2024-12-13T18:05:52Z