Re: gcc -fvisibility=hidden

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Elliot Leonard <elliotleonard97215@xxxxxxxxx> 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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux