This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/15000] Support setting the default symbol visibility for ELF
- From: "s_gccbugzilla at nedprod dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 May 2004 21:58:31 -0000
- Subject: [Bug other/15000] Support setting the default symbol visibility for ELF
- References: <20040418032536.15000.bryner@brianryner.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From s_gccbugzilla at nedprod dot com 2004-05-12 21:58 -------
Thought it should be of public record that with -fvisibility=hidden support
fully integrated, my TnFOX library exports 9435 symbols with GCC versus 9038
with MSVC. That's pretty good and the difference can be traced to mostly
differences between the MSVC and GCC RTTI implementation.
Some thoughts on my most recent patch:
It occurred to me in bed last night that it would be nice if GCC gave a warning
if any of its base classes or data members did not have default visibility when
it itself did. It would be slightly complex however because when inheriting off
an instantiated template the base class could be entirely inlineable, in which
case whether it has default visibility or not is an implementational choice and
not something which will cause errors. Of course at final link you get these
errors anyway, but what happens if the DSO is being loaded and managed manually?
The new -fvisibility-inlines-hidden isn't being aggressive enough in hiding
inlines members and I don't know why. I'm using DECL_INLINE() which I think is
correct? Any help here would be appreciated. Nevertheless, I'm seeing around a
40% reduction which is respectable enough given it requires no source changes
(60% reduction with -fvisibility=hidden).
Cheers,
Niall
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15000