public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/17828] New: -O2 -fPIC doesn't work with switches in linkonce functions and new binutils
@ 2004-10-04  9:25 jakub at gcc dot gnu dot org
  2004-10-04  9:44 ` [Bug target/17828] " jakub at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2004-10-04  9:25 UTC (permalink / raw)
  To: gcc-bugs

--- gcc/testsuite/g++.old-deja/g++.other/comdat5.C.jj   2004-10-04
11:20:08.335577980 +0200
+++ gcc/testsuite/g++.old-deja/g++.other/comdat5.C      2004-10-04
11:19:49.362989353 +0200
@@ -0,0 +1,5 @@
+// { dg-do link }
+// { dg-additional-sources " comdat5-aux.cc" }
+// { dg-options "-O2 -fPIC" }
+
+#include "comdat4.C"
--- gcc/testsuite/g++.old-deja/g++.other/comdat5-aux.cc.jj      2004-10-04
11:20:03.496448065 +0200
+++ gcc/testsuite/g++.old-deja/g++.other/comdat5-aux.cc 2004-10-04
11:19:59.249211735 +0200
@@ -0,0 +1,1 @@
+#include "comdat4-aux.cc"

fails on powerpc-redhat-linux.
The local label at the start of jump table is spilled into .got2 section.

-- 
           Summary: -O2 -fPIC doesn't work with switches in linkonce
                    functions and new binutils
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: powerpc-redhat-linux


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


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

* [Bug target/17828] -O2 -fPIC doesn't work with switches in linkonce functions and new binutils
  2004-10-04  9:25 [Bug target/17828] New: -O2 -fPIC doesn't work with switches in linkonce functions and new binutils jakub at gcc dot gnu dot org
@ 2004-10-04  9:44 ` jakub at gcc dot gnu dot org
  2004-10-04  9:49 ` jakub at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2004-10-04  9:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jakub at gcc dot gnu dot org  2004-10-04 09:44 -------
GCC 3.3.x has the same problem.
Not sure if we want to backport COMDAT patches to GCC 3.3 and 3.4.
Other possible alternative would be to:
a) change ppc32 linker script, so that .got2 section includes both .got2
   and .gnu.linkonce.got2.* sections
b) change rs6000 backend, so that it uses per-function .got2 sections
   for linkonce functions
Or change ld to not error on this problem for another 3 years until all compilers
use COMDAT.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amodra at bigpond dot net
                   |                            |dot au


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


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

* [Bug target/17828] -O2 -fPIC doesn't work with switches in linkonce functions and new binutils
  2004-10-04  9:25 [Bug target/17828] New: -O2 -fPIC doesn't work with switches in linkonce functions and new binutils jakub at gcc dot gnu dot org
  2004-10-04  9:44 ` [Bug target/17828] " jakub at gcc dot gnu dot org
@ 2004-10-04  9:49 ` jakub at gcc dot gnu dot org
  2004-10-04 10:07 ` dwmw2 at infradead dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2004-10-04  9:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jakub at gcc dot gnu dot org  2004-10-04 09:48 -------
Well, the COMDAT changes on HEAD don't solve this problem either.
So I guess we need either per-function .got2 for comdat functions, 
or revert the binutils warnings (or at least turn them off by default).

-- 


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


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

* [Bug target/17828] -O2 -fPIC doesn't work with switches in linkonce functions and new binutils
  2004-10-04  9:25 [Bug target/17828] New: -O2 -fPIC doesn't work with switches in linkonce functions and new binutils jakub at gcc dot gnu dot org
  2004-10-04  9:44 ` [Bug target/17828] " jakub at gcc dot gnu dot org
  2004-10-04  9:49 ` jakub at gcc dot gnu dot org
@ 2004-10-04 10:07 ` dwmw2 at infradead dot org
  2004-10-05 11:32 ` amodra at bigpond dot net dot au
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: dwmw2 at infradead dot org @ 2004-10-04 10:07 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dwmw2 at infradead dot org


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


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

* [Bug target/17828] -O2 -fPIC doesn't work with switches in linkonce functions and new binutils
  2004-10-04  9:25 [Bug target/17828] New: -O2 -fPIC doesn't work with switches in linkonce functions and new binutils jakub at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-10-04 10:07 ` dwmw2 at infradead dot org
@ 2004-10-05 11:32 ` amodra at bigpond dot net dot au
  2004-10-05 11:47 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-10-05 11:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2004-10-05 11:32 -------
If we turn off this ld warning, then we lose sight of the fact that gcc does
have a bug here.  gcc ought to be using linkonce for all sections emitted for a
given function if any section is linkonce (waiver granted for debug and other
sections that the linker edits).

-- 


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


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

* [Bug target/17828] -O2 -fPIC doesn't work with switches in linkonce functions and new binutils
  2004-10-04  9:25 [Bug target/17828] New: -O2 -fPIC doesn't work with switches in linkonce functions and new binutils jakub at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-10-05 11:32 ` amodra at bigpond dot net dot au
@ 2004-10-05 11:47 ` pinskia at gcc dot gnu dot org
  2005-05-19 11:29 ` amodra at bigpond dot net dot au
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-05 11:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-05 11:47 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-10-05 11:47:43
               date|                            |


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


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

* [Bug target/17828] -O2 -fPIC doesn't work with switches in linkonce functions and new binutils
  2004-10-04  9:25 [Bug target/17828] New: -O2 -fPIC doesn't work with switches in linkonce functions and new binutils jakub at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-10-05 11:47 ` pinskia at gcc dot gnu dot org
@ 2005-05-19 11:29 ` amodra at bigpond dot net dot au
  2005-07-25 11:58 ` olh at suse dot de
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: amodra at bigpond dot net dot au @ 2005-05-19 11:29 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |amodra at bigpond dot net
                   |dot org                     |dot au
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2004-10-05 11:47:43         |2005-05-19 11:24:54
               date|                            |


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


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

* [Bug target/17828] -O2 -fPIC doesn't work with switches in linkonce functions and new binutils
  2004-10-04  9:25 [Bug target/17828] New: -O2 -fPIC doesn't work with switches in linkonce functions and new binutils jakub at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-05-19 11:29 ` amodra at bigpond dot net dot au
@ 2005-07-25 11:58 ` olh at suse dot de
  2005-07-27  2:29 ` amodra at bigpond dot net dot au
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: olh at suse dot de @ 2005-07-25 11:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From olh at suse dot de  2005-07-25 11:53 -------
Is there a workaround (some --foo option for gcc/ld) for these link errors?


-- 


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


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

* [Bug target/17828] -O2 -fPIC doesn't work with switches in linkonce functions and new binutils
  2004-10-04  9:25 [Bug target/17828] New: -O2 -fPIC doesn't work with switches in linkonce functions and new binutils jakub at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-07-25 11:58 ` olh at suse dot de
@ 2005-07-27  2:29 ` amodra at bigpond dot net dot au
  2005-07-29  3:21 ` amodra at bigpond dot net dot au
  2005-07-29  7:25 ` jakub at redhat dot com
  9 siblings, 0 replies; 14+ messages in thread
From: amodra at bigpond dot net dot au @ 2005-07-27  2:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2005-07-27 02:23 -------
http://gcc.gnu.org/ml/gcc-patches/2005-07/msg01757.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


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


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

* [Bug target/17828] -O2 -fPIC doesn't work with switches in linkonce functions and new binutils
  2004-10-04  9:25 [Bug target/17828] New: -O2 -fPIC doesn't work with switches in linkonce functions and new binutils jakub at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2005-07-27  2:29 ` amodra at bigpond dot net dot au
@ 2005-07-29  3:21 ` amodra at bigpond dot net dot au
  2005-07-29  7:25 ` jakub at redhat dot com
  9 siblings, 0 replies; 14+ messages in thread
From: amodra at bigpond dot net dot au @ 2005-07-29  3:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2005-07-29 02:50 -------
Fixed by linker patch
http://sources.redhat.com/ml/binutils-cvs/2005-07/msg00201.html

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


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


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

* [Bug target/17828] -O2 -fPIC doesn't work with switches in linkonce functions and new binutils
  2004-10-04  9:25 [Bug target/17828] New: -O2 -fPIC doesn't work with switches in linkonce functions and new binutils jakub at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2005-07-29  3:21 ` amodra at bigpond dot net dot au
@ 2005-07-29  7:25 ` jakub at redhat dot com
  9 siblings, 0 replies; 14+ messages in thread
From: jakub at redhat dot com @ 2005-07-29  7:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jakub at redhat dot com  2005-07-29 06:54 -------
Do we want to check the comdat5* testcase in?

-- 


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


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

* [Bug target/17828] -O2 -fPIC doesn't work with switches in linkonce functions and new binutils
       [not found] <bug-17828-87@http.gcc.gnu.org/bugzilla/>
  2005-11-21  9:52 ` jakub at gcc dot gnu dot org
  2005-12-08 21:47 ` jakub at gcc dot gnu dot org
@ 2005-12-08 21:54 ` jakub at gcc dot gnu dot org
  2 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-12-08 21:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from jakub at gcc dot gnu dot org  2005-12-08 21:54 -------
Subject: Bug 17828

Author: jakub
Date: Thu Dec  8 21:53:59 2005
New Revision: 108251

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108251
Log:
        PR target/17828
        * g++.old-deja/g++.other/comdat5.C: New test.
        * g++.old-deja/g++.other/comdat5-aux.cc: New file.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.old-deja/g++.other/comdat5-aux.cc
    branches/gcc-4_1-branch/gcc/testsuite/g++.old-deja/g++.other/comdat5.C
Modified:
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug target/17828] -O2 -fPIC doesn't work with switches in linkonce functions and new binutils
       [not found] <bug-17828-87@http.gcc.gnu.org/bugzilla/>
  2005-11-21  9:52 ` jakub at gcc dot gnu dot org
@ 2005-12-08 21:47 ` jakub at gcc dot gnu dot org
  2005-12-08 21:54 ` jakub at gcc dot gnu dot org
  2 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-12-08 21:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jakub at gcc dot gnu dot org  2005-12-08 21:47 -------
Subject: Bug 17828

Author: jakub
Date: Thu Dec  8 21:47:10 2005
New Revision: 108245

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108245
Log:
        PR target/17828
        * g++.old-deja/g++.other/comdat5.C: New test.
        * g++.old-deja/g++.other/comdat5-aux.cc: New file.

Added:
    trunk/gcc/testsuite/g++.old-deja/g++.other/comdat5-aux.cc
    trunk/gcc/testsuite/g++.old-deja/g++.other/comdat5.C
Modified:
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug target/17828] -O2 -fPIC doesn't work with switches in linkonce functions and new binutils
       [not found] <bug-17828-87@http.gcc.gnu.org/bugzilla/>
@ 2005-11-21  9:52 ` jakub at gcc dot gnu dot org
  2005-12-08 21:47 ` jakub at gcc dot gnu dot org
  2005-12-08 21:54 ` jakub at gcc dot gnu dot org
  2 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-11-21  9:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from jakub at gcc dot gnu dot org  2005-11-21 09:52 -------
Subject: Bug 17828

Author: jakub
Date: Mon Nov 21 09:52:20 2005
New Revision: 107297

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107297
Log:
        PR target/17828
        * g++.old-deja/g++.other/comdat5.C: New test.
        * g++.old-deja/g++.other/comdat5-aux.cc: New file.

Added:
   
branches/gcc-4_0-rhl-branch/gcc/testsuite/g++.old-deja/g++.other/comdat5-aux.cc
    branches/gcc-4_0-rhl-branch/gcc/testsuite/g++.old-deja/g++.other/comdat5.C
Modified:
    branches/gcc-4_0-rhl-branch/gcc/testsuite/ChangeLog


-- 


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


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

end of thread, other threads:[~2005-12-08 21:54 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-04  9:25 [Bug target/17828] New: -O2 -fPIC doesn't work with switches in linkonce functions and new binutils jakub at gcc dot gnu dot org
2004-10-04  9:44 ` [Bug target/17828] " jakub at gcc dot gnu dot org
2004-10-04  9:49 ` jakub at gcc dot gnu dot org
2004-10-04 10:07 ` dwmw2 at infradead dot org
2004-10-05 11:32 ` amodra at bigpond dot net dot au
2004-10-05 11:47 ` pinskia at gcc dot gnu dot org
2005-05-19 11:29 ` amodra at bigpond dot net dot au
2005-07-25 11:58 ` olh at suse dot de
2005-07-27  2:29 ` amodra at bigpond dot net dot au
2005-07-29  3:21 ` amodra at bigpond dot net dot au
2005-07-29  7:25 ` jakub at redhat dot com
     [not found] <bug-17828-87@http.gcc.gnu.org/bugzilla/>
2005-11-21  9:52 ` jakub at gcc dot gnu dot org
2005-12-08 21:47 ` jakub at gcc dot gnu dot org
2005-12-08 21:54 ` jakub 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).