This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: -fvisibility-inlines-hidden not hiding inline methods?
- From: Ian Lance Taylor <iant at google dot com>
- To: Lassi Tuura <lat at cern dot ch>
- Cc: <gcc-help at gcc dot gnu dot org>, Peter Elmer <Peter dot Elmer at cern dot ch>, Giulio Eulisse <Giulio dot Eulisse at cern dot ch>
- Date: Fri, 10 Jul 2009 07:51:13 -0700
- Subject: Re: -fvisibility-inlines-hidden not hiding inline methods?
- References: <E2B47A97-DB38-4A7F-B1DA-9741077CFB85@cern.ch>
Lassi Tuura <lat@cern.ch> writes:
> We are using GCC 4.3.2 + binutils 2.19.1 on a RHEL4-derived system.
> We're testing -fvisibility-inlines-hidden, and don't quite understand
> what it does. We are seeing some but not all inline functions getting
> emitted out-of-line as public weak symbols and calls to them going
> via the PLT; the documentation seems to indicate this would not
> happen.
-fvisibility-inlines-hidden only affects inline methods. It does not
affect inline functions which are not methods. E.g., your test cases
uses std::sort, but std::sort is not an inline method of any class. In
general -fvisibility-inlines-hidden does not apply to template
instantiations, since that would break explicit instantiations.
Ian