This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47529] New: Visibility attributes not supported on Solaris i386 platform
- From: "yuri at tsoft dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 29 Jan 2011 07:07:37 +0000
- Subject: [Bug c++/47529] New: Visibility attributes not supported on Solaris i386 platform
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47529
Summary: Visibility attributes not supported on Solaris i386
platform
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: yuri@tsoft.com
I am porting project to Solaris.
Same code that builds fine on Linux/BSD produces warnings on Solaris 10:
warning: visibility attribute not supported in this configuration; ignored
Compilation of modules succeeds with these warnings.
But later linking of those object modules into the shared library fails with
this message:
ld: fatal: relocation error: R_386_GOTOFF: file
/path/to/library/libmine.a(module.o): symbol <some symbol is here>: relocation
must bind locally.
collect2: ld returned 1 exit status
I have built gcc-4.5.2 myself with the same options on both Linux and Solaris.
Why wouldn't visibility attributes not be supported in Solaris configuration?
Also reading some threads from the past I see that these two messages are
somewhat related. Due to the lack of visibility attributes some symbol with
R_386_GOTOFF becomes global and can't be linked into the shared library as
global.
How to solve such problem when c++ code defines some symbols with "hidden"
attributes and Solaris version of gcc fails to support this?