* [Bug target/31490] Compile error section type conflict
2007-04-06 0:28 [Bug target/31490] New: Compile error section type conflict raj dot khem at gmail dot com
@ 2007-04-06 0:28 ` raj dot khem at gmail dot com
2007-04-06 0:57 ` pinskia at gcc dot gnu dot org
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: raj dot khem at gmail dot com @ 2007-04-06 0:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from raj dot khem at gmail dot com 2007-04-06 01:28 -------
Created an attachment (id=13333)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13333&action=view)
testcase
testcase to reproduce the problem.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31490
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/31490] Compile error section type conflict
2007-04-06 0:28 [Bug target/31490] New: Compile error section type conflict raj dot khem at gmail dot com
2007-04-06 0:28 ` [Bug target/31490] " raj dot khem at gmail dot com
@ 2007-04-06 0:57 ` pinskia at gcc dot gnu dot org
2007-04-06 0:59 ` pinskia at gcc dot gnu dot org
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-06 0:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-04-06 01:57 -------
Reduced testcase:
int cpu_ (void *attr) {}
const unsigned long _1 __attribute__((section("__"))) = (unsigned long)&cpu_ ;
const unsigned long _group __attribute__((section("__"))) = 0;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31490
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/31490] Compile error section type conflict
2007-04-06 0:28 [Bug target/31490] New: Compile error section type conflict raj dot khem at gmail dot com
2007-04-06 0:28 ` [Bug target/31490] " raj dot khem at gmail dot com
2007-04-06 0:57 ` pinskia at gcc dot gnu dot org
@ 2007-04-06 0:59 ` pinskia at gcc dot gnu dot org
2007-04-06 2:19 ` dtemirbulatov at gmail dot com
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-06 0:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2007-04-06 01:59 -------
> This error was not happening with gcc 4.2 snapshot from January.
My reduced testcase shows it happens even in 4.0.2. I don't have any thing
older than that right off hand.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31490
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/31490] Compile error section type conflict
2007-04-06 0:28 [Bug target/31490] New: Compile error section type conflict raj dot khem at gmail dot com
` (2 preceding siblings ...)
2007-04-06 0:59 ` pinskia at gcc dot gnu dot org
@ 2007-04-06 2:19 ` dtemirbulatov at gmail dot com
2007-05-02 15:14 ` dtemirbulatov at gmail dot com
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: dtemirbulatov at gmail dot com @ 2007-04-06 2:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from dtemirbulatov at gmail dot com 2007-04-06 03:18 -------
looks like regression is caused by PR26090 fix
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31490
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/31490] Compile error section type conflict
2007-04-06 0:28 [Bug target/31490] New: Compile error section type conflict raj dot khem at gmail dot com
` (3 preceding siblings ...)
2007-04-06 2:19 ` dtemirbulatov at gmail dot com
@ 2007-05-02 15:14 ` dtemirbulatov at gmail dot com
2007-05-02 15:26 ` dtemirbulatov at gmail dot com
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: dtemirbulatov at gmail dot com @ 2007-05-02 15:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from dtemirbulatov at gmail dot com 2007-05-02 16:14 -------
I can reproduce this bug any architecture with -fpic option
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31490
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/31490] Compile error section type conflict
2007-04-06 0:28 [Bug target/31490] New: Compile error section type conflict raj dot khem at gmail dot com
` (4 preceding siblings ...)
2007-05-02 15:14 ` dtemirbulatov at gmail dot com
@ 2007-05-02 15:26 ` dtemirbulatov at gmail dot com
2007-05-02 15:41 ` [Bug middle-end/31490] " pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: dtemirbulatov at gmail dot com @ 2007-05-02 15:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from dtemirbulatov at gmail dot com 2007-05-02 16:25 -------
workaround for the bug:
--- gcc/varasm.c-orig 2007-05-02 19:15:04.000000000 +0400
+++ gcc/varasm.c 2007-05-02 19:16:17.000000000 +0400
@@ -5519,6 +5519,8 @@ decl_readonly_section (tree decl, int re
case SECCAT_RODATA_MERGE_STR_INIT:
case SECCAT_RODATA_MERGE_CONST:
case SECCAT_SRODATA:
+ case SECCAT_DATA_REL_RO:
+ case SECCAT_DATA_REL_RO_LOCAL:
return true;
break;
default:
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31490
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/31490] Compile error section type conflict
2007-04-06 0:28 [Bug target/31490] New: Compile error section type conflict raj dot khem at gmail dot com
` (5 preceding siblings ...)
2007-05-02 15:26 ` dtemirbulatov at gmail dot com
@ 2007-05-02 15:41 ` pinskia at gcc dot gnu dot org
2007-05-15 12:07 ` segher at kernel dot crashing dot org
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-02 15:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pinskia at gcc dot gnu dot org 2007-05-02 16:41 -------
> I can reproduce this bug any architecture with -fpic option
Oh and this is why it fails without -fpic on powerpc64-linux-gnu as really it
is always PIC with the toc based ABI.
>workaround for the bug:
Actually that looks like the correct fix from reading output.h's comment about
these section categories.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|target |middle-end
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-05-02 16:41:08
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31490
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/31490] Compile error section type conflict
2007-04-06 0:28 [Bug target/31490] New: Compile error section type conflict raj dot khem at gmail dot com
` (6 preceding siblings ...)
2007-05-02 15:41 ` [Bug middle-end/31490] " pinskia at gcc dot gnu dot org
@ 2007-05-15 12:07 ` segher at kernel dot crashing dot org
2007-05-16 21:47 ` dtemirbulatov at gmail dot com
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: segher at kernel dot crashing dot org @ 2007-05-15 12:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from segher at kernel dot crashing dot org 2007-05-15 13:07 -------
Bisecting shows that the original bug (powerpc64 Linux build
errors out) is caused by r122781. I didn't actually test on 4.2
but the same patch is applied there (as r122782).
If the reduced testcase in comment #2 fails on older compilers,
it is likely a different bug (or an invalid testcase); if a bug, please
file a separate PR for it.
--
segher at kernel dot crashing dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |segher at kernel dot
| |crashing dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31490
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/31490] Compile error section type conflict
2007-04-06 0:28 [Bug target/31490] New: Compile error section type conflict raj dot khem at gmail dot com
` (7 preceding siblings ...)
2007-05-15 12:07 ` segher at kernel dot crashing dot org
@ 2007-05-16 21:47 ` dtemirbulatov at gmail dot com
2007-05-18 13:57 ` segher at kernel dot crashing dot org
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: dtemirbulatov at gmail dot com @ 2007-05-16 21:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from dtemirbulatov at gmail dot com 2007-05-16 22:47 -------
This patch fixes both testcases
--- gcc/varasm.c.orig 2007-05-16 21:32:11.000000000 +0400
+++ gcc/varasm.c 2007-05-16 21:36:14.000000000 +0400
@@ -5762,12 +5762,14 @@ categorize_decl_for_section (tree decl,
be read-only or not, but whether the dynamic link will have to
do something. If so, we wish to segregate the data in order to
minimize cache misses inside the dynamic linker. */
- if (reloc & targetm.asm_out.reloc_rw_mask ())
+ if (reloc & targetm.asm_out.reloc_rw_mask ()
+ && !lookup_attribute ("section", DECL_ATTRIBUTES (decl)))
ret = reloc == 1 ? SECCAT_DATA_REL_LOCAL : SECCAT_DATA_REL;
else
ret = SECCAT_DATA;
}
- else if (reloc & targetm.asm_out.reloc_rw_mask ())
+ else if (reloc & targetm.asm_out.reloc_rw_mask ()
+ && !lookup_attribute ("section", DECL_ATTRIBUTES (decl)))
ret = reloc == 1 ? SECCAT_DATA_REL_RO_LOCAL : SECCAT_DATA_REL_RO;
else if (reloc || flag_merge_constants < 2)
/* C and C++ don't allow different variables to share the same
, bootstraped and tested on i686-pc-linux-gnu with no new regressions, tested
4.2 version with gdb-sim on following architectures arm-elf, arm-none-eabi,
mips-elf, mipsisa64-elf, powerpc-eabisim, sh-elf, powerpc-unknown-eabispe with
no new regressions
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31490
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/31490] Compile error section type conflict
2007-04-06 0:28 [Bug target/31490] New: Compile error section type conflict raj dot khem at gmail dot com
` (8 preceding siblings ...)
2007-05-16 21:47 ` dtemirbulatov at gmail dot com
@ 2007-05-18 13:57 ` segher at kernel dot crashing dot org
2007-06-20 11:32 ` schwab at suse dot de
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: segher at kernel dot crashing dot org @ 2007-05-18 13:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from segher at kernel dot crashing dot org 2007-05-18 14:57 -------
Created an attachment (id=13578)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13578&action=view)
proposed patch
still need to run the testsuite on it
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31490
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/31490] Compile error section type conflict
2007-04-06 0:28 [Bug target/31490] New: Compile error section type conflict raj dot khem at gmail dot com
` (9 preceding siblings ...)
2007-05-18 13:57 ` segher at kernel dot crashing dot org
@ 2007-06-20 11:32 ` schwab at suse dot de
2007-08-27 21:54 ` janis at gcc dot gnu dot org
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: schwab at suse dot de @ 2007-06-20 11:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from schwab at suse dot de 2007-06-20 11:32 -------
Also broken on ia64.
--
schwab at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC target triplet|powerpc64-*-linux-gnu |powerpc64-*-linux-gnu,ia64-
| |*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31490
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/31490] Compile error section type conflict
2007-04-06 0:28 [Bug target/31490] New: Compile error section type conflict raj dot khem at gmail dot com
` (10 preceding siblings ...)
2007-06-20 11:32 ` schwab at suse dot de
@ 2007-08-27 21:54 ` janis at gcc dot gnu dot org
2007-08-28 16:25 ` dtemirbulatov at gmail dot com
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: janis at gcc dot gnu dot org @ 2007-08-27 21:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from janis at gcc dot gnu dot org 2007-08-27 21:54 -------
Trunk currently fails on powerpc64-linux building
libstdc++-v3/src/system_error.cc. Hacking libtool a bit allows seeing the
message "std::system_category causes a section type conflict". The file is
compiled with -O2 and -fdata-sections; if either of those is removed then the
bootstrap succeeds.
This PR looked related (and Andrew Pinski confirmed that it is) so I tried the
patch from comment #10; it needs more parens to avoid warnings, but with that
patch the bootstrap succeeds.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31490
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/31490] Compile error section type conflict
2007-04-06 0:28 [Bug target/31490] New: Compile error section type conflict raj dot khem at gmail dot com
` (11 preceding siblings ...)
2007-08-27 21:54 ` janis at gcc dot gnu dot org
@ 2007-08-28 16:25 ` dtemirbulatov at gmail dot com
2007-08-28 18:15 ` janis at gcc dot gnu dot org
` (3 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: dtemirbulatov at gmail dot com @ 2007-08-28 16:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from dtemirbulatov at gmail dot com 2007-08-28 16:25 -------
reviewed patch posted here
http://gcc.gnu.org/ml/gcc-patches/2007-05/msg01280.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31490
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/31490] Compile error section type conflict
2007-04-06 0:28 [Bug target/31490] New: Compile error section type conflict raj dot khem at gmail dot com
` (12 preceding siblings ...)
2007-08-28 16:25 ` dtemirbulatov at gmail dot com
@ 2007-08-28 18:15 ` janis at gcc dot gnu dot org
2007-08-31 17:42 ` drow at gcc dot gnu dot org
` (2 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: janis at gcc dot gnu dot org @ 2007-08-28 18:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from janis at gcc dot gnu dot org 2007-08-28 18:15 -------
The patch that I tried is the one attached for comment #10, not the one in
comment #9. With that patch a bootstrap of all languages but Ada succeeded.
The test results look reasonable, although I don't have results from the last
few days with which to compare them.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31490
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/31490] Compile error section type conflict
2007-04-06 0:28 [Bug target/31490] New: Compile error section type conflict raj dot khem at gmail dot com
` (13 preceding siblings ...)
2007-08-28 18:15 ` janis at gcc dot gnu dot org
@ 2007-08-31 17:42 ` drow at gcc dot gnu dot org
2007-11-28 5:12 ` etiennes at cse dot unsw dot edu dot au
2010-04-16 22:30 ` sje at cup dot hp dot com
16 siblings, 0 replies; 18+ messages in thread
From: drow at gcc dot gnu dot org @ 2007-08-31 17:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from drow at gcc dot gnu dot org 2007-08-31 17:42 -------
Has Segher's patch been sent to gcc-patches? I've just encountered the ppc64
bootstrap failure too.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31490
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/31490] Compile error section type conflict
2007-04-06 0:28 [Bug target/31490] New: Compile error section type conflict raj dot khem at gmail dot com
` (14 preceding siblings ...)
2007-08-31 17:42 ` drow at gcc dot gnu dot org
@ 2007-11-28 5:12 ` etiennes at cse dot unsw dot edu dot au
2010-04-16 22:30 ` sje at cup dot hp dot com
16 siblings, 0 replies; 18+ messages in thread
From: etiennes at cse dot unsw dot edu dot au @ 2007-11-28 5:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from etiennes at cse dot unsw dot edu dot au 2007-11-28 05:11 -------
I just tried compiling 2.6.23.9 ia64 and the compile failed citing
drivers/char/ipmi/ipmi_si_intf.c:1095: error: __param_hotmod causes a section
type conflict
gcc (GCC) 4.2.3 20071123 (prerelease) (Debian 4.2.2-4)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31490
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/31490] Compile error section type conflict
2007-04-06 0:28 [Bug target/31490] New: Compile error section type conflict raj dot khem at gmail dot com
` (15 preceding siblings ...)
2007-11-28 5:12 ` etiennes at cse dot unsw dot edu dot au
@ 2010-04-16 22:30 ` sje at cup dot hp dot com
16 siblings, 0 replies; 18+ messages in thread
From: sje at cup dot hp dot com @ 2010-04-16 22:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from sje at cup dot hp dot com 2010-04-16 22:29 -------
Is there any reason none of the patches created for this bug have been checked
in? I still get a 'section type conflict' on IA64 with the test case from
Comment #2.
--
sje at cup dot hp dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sje at cup dot hp dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31490
^ permalink raw reply [flat|nested] 18+ messages in thread