This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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]

Re: gcc -fvisibility=hidden


Elliot Leonard <elliotleonard97215@gmail.com> writes:

> However under Linux, when we invoke a member function of GPortRef in
> lib A, we see printf's coming from the lib B version of GPortRef. Very
> bad karma. We have seen this under Ubuntu when running gcc version 4.2.3.
>
> We have a tentative workaround, but it involves embedding each
> of our shared libraries in separate C++ namespaces, which requires
> that lots of files be touched. Does anyone know how to solve this
> without resorting to namespaces? Why doesn't -fvisibility=hidden work?

I don't know why it doesn't work.  I do know that several bugs in the
handling of visibility for things like C++ virtual tables and typeinfo
structures have been fixed since the gcc 4.2 release.  Also the version
of the GNU binutils is relevant.  But I don't know if that is the sort
of problem you are encountering.  You are going to have to give us more
information.  You can use readelf to determine whether you have any
relocations against non-hidden symbols.

Ian


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