public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/20199] New: -fvisibility-inlines-hidden broken on powerpc64-linux
@ 2005-02-24 22:45 janis at gcc dot gnu dot org
  2005-02-24 22:55 ` [Bug target/20199] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: janis at gcc dot gnu dot org @ 2005-02-24 22:45 UTC (permalink / raw)
  To: gcc-bugs

The C++ option -fvisibility-inlines-hidden doesn't work on powerpc64-linux.
I don't understand the problem well enough to describe it well or to
provide a small test case that doesn't depend on using libstdc++.  The
problem shows up with anything that uses <iostream>, and also with the
test g++.old-deja/g++.pt/ttp19.C which uses <vector>.
                                                                                
With current mainline and binutils 2.15, a program links successfully but
dies at runtime with an illegal instruction, apparently trying to execute
data.  With binutils from CVS the link fails; for ttp19.C the message is
                                                                                
elm3b11% $INST/bin/g++ -m64 -fvisibility-inlines-hidden ttp19.C
.../bin/ld: /tmp/ccR7UhuH.o(.text+0x48): unresolvable R_PPC64_REL24 relocation
against symbol `std::allocator<char>::allocator()@@GLIBCXX_3.4'
.../bin/ld: /tmp/ccR7UhuH.o(.text+0x60): unresolvable R_PPC64_REL24 relocation
against symbol `std::allocator<char>::~allocator()@@GLIBCXX_3.4'
.../bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
                                                                                
This might well be a binutils problem rather than a GCC problem, although
a fix to binutils will also require updated GCC documentation about which
version of binutils is required for powerpc64-linux.

-- 
           Summary: -fvisibility-inlines-hidden broken on powerpc64-linux
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: janis at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: powerpc64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20199


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/20199] -fvisibility-inlines-hidden broken on powerpc64-linux
  2005-02-24 22:45 [Bug target/20199] New: -fvisibility-inlines-hidden broken on powerpc64-linux janis at gcc dot gnu dot org
@ 2005-02-24 22:55 ` pinskia at gcc dot gnu dot org
  2005-02-26 23:21 ` janis at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-24 22:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-24 19:00 -------
I think this is the same as PR 19664.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20199


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/20199] -fvisibility-inlines-hidden broken on powerpc64-linux
  2005-02-24 22:45 [Bug target/20199] New: -fvisibility-inlines-hidden broken on powerpc64-linux janis at gcc dot gnu dot org
  2005-02-24 22:55 ` [Bug target/20199] " pinskia at gcc dot gnu dot org
@ 2005-02-26 23:21 ` janis at gcc dot gnu dot org
  2005-02-26 23:30 ` janis at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: janis at gcc dot gnu dot org @ 2005-02-26 23:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From janis at gcc dot gnu dot org  2005-02-25 23:53 -------
Ah, yes.  I haven't come up with a testcase that doesn't use libstdc++,
but the following testcase fails without the patch referenced in
comment #28 and passes with it:
                                                                                
#pragma GCC visibility push(default)
#include <memory>
#pragma GCC visibility pop
                                                                                
void foo()
{
    std::allocator<char> c2;
}
                                                                                
Command line: g++ -m64 -fvisibility-inlines-hidden -shared -o libx.C x.C
                                                                                
Without the #pragmas, this works with 20050223 mainline and binutils
when <char> is replaced by <int>; there are explicit instantiations in
libstdc++ for allocator<char> but not for allocator<int>.  This is all
with -m64, with -m32 I haven't seen any problems at all.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20199


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/20199] -fvisibility-inlines-hidden broken on powerpc64-linux
  2005-02-24 22:45 [Bug target/20199] New: -fvisibility-inlines-hidden broken on powerpc64-linux janis at gcc dot gnu dot org
  2005-02-24 22:55 ` [Bug target/20199] " pinskia at gcc dot gnu dot org
  2005-02-26 23:21 ` janis at gcc dot gnu dot org
@ 2005-02-26 23:30 ` janis at gcc dot gnu dot org
  2005-03-25 22:21 ` janis at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: janis at gcc dot gnu dot org @ 2005-02-26 23:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From janis at gcc dot gnu dot org  2005-02-26 00:15 -------
My command line in the previous comment should have said "-o libx.so".

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20199


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/20199] -fvisibility-inlines-hidden broken on powerpc64-linux
  2005-02-24 22:45 [Bug target/20199] New: -fvisibility-inlines-hidden broken on powerpc64-linux janis at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-02-26 23:30 ` janis at gcc dot gnu dot org
@ 2005-03-25 22:21 ` janis at gcc dot gnu dot org
  2005-03-26  6:31 ` aj at gcc dot gnu dot org
  2005-04-20  2:16 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: janis at gcc dot gnu dot org @ 2005-03-25 22:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From janis at gcc dot gnu dot org  2005-03-25 22:21 -------
This works with today's 4.0-branch sources, with small test cases and also
with eon built with this option.  I haven't checked to see when it was
fixed, but this PR can now be closed.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20199


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/20199] -fvisibility-inlines-hidden broken on powerpc64-linux
  2005-02-24 22:45 [Bug target/20199] New: -fvisibility-inlines-hidden broken on powerpc64-linux janis at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-03-25 22:21 ` janis at gcc dot gnu dot org
@ 2005-03-26  6:31 ` aj at gcc dot gnu dot org
  2005-04-20  2:16 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: aj at gcc dot gnu dot org @ 2005-03-26  6:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From aj at gcc dot gnu dot org  2005-03-26 06:31 -------
Close as suggested

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20199


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/20199] -fvisibility-inlines-hidden broken on powerpc64-linux
  2005-02-24 22:45 [Bug target/20199] New: -fvisibility-inlines-hidden broken on powerpc64-linux janis at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-03-26  6:31 ` aj at gcc dot gnu dot org
@ 2005-04-20  2:16 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-20  2:16 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20199


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-04-20  2:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-24 22:45 [Bug target/20199] New: -fvisibility-inlines-hidden broken on powerpc64-linux janis at gcc dot gnu dot org
2005-02-24 22:55 ` [Bug target/20199] " pinskia at gcc dot gnu dot org
2005-02-26 23:21 ` janis at gcc dot gnu dot org
2005-02-26 23:30 ` janis at gcc dot gnu dot org
2005-03-25 22:21 ` janis at gcc dot gnu dot org
2005-03-26  6:31 ` aj at gcc dot gnu dot org
2005-04-20  2:16 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).