First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 17828
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Alan Modra <amodra@gmail.com>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Jakub Jelinek <jakub@gcc.gnu.org>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
P broken patch patch 2005-07-26 18:10 3.66 KB Edit | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 17828 depends on: Show dependency tree
Show dependency graph
Bug 17828 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2005-05-19 11:24 Opened: 2004-10-04 09:25
--- 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.

------- Comment #1 From Jakub Jelinek 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.

------- Comment #2 From Jakub Jelinek 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).

------- Comment #3 From Alan Modra 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).

------- Comment #4 From Andrew Pinski 2004-10-05 11:47 -------
Confirmed.

------- Comment #5 From olh@suse.de 2005-07-25 11:53 -------
Is there a workaround (some --foo option for gcc/ld) for these link errors?

------- Comment #6 From Jakub Jelinek 2005-07-26 18:10 -------
Created an attachment (id=9368) [edit]
broken patch

I'm actually not really sure if COMDAT .got2/.got1/.toc1 etc. (as implemented
in this patch) is the way to go.  The reason is that then suddenly we can't
have
one constant pool but need per-function constant pools
(e.g. with this patch pool_allocator.cc -m32 -O2 -fPIC fails to assemble).

Can't we instead do link editing of these ppc sections?

------- Comment #7 From Alan Modra 2005-07-27 02:23 -------
http://gcc.gnu.org/ml/gcc-patches/2005-07/msg01757.html

------- Comment #8 From Alan Modra 2005-07-29 02:50 -------
Fixed by linker patch
http://sources.redhat.com/ml/binutils-cvs/2005-07/msg00201.html

------- Comment #9 From Jakub Jelinek 2005-07-29 06:54 -------
Do we want to check the comdat5* testcase in?

------- Comment #10 From Jakub Jelinek 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

------- Comment #11 From Jakub Jelinek 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

------- Comment #12 From Jakub Jelinek 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

First Last Prev Next    No search results available      Search page      Enter new bug