* [Bug lto/52489] LTO drops init_array/fini_array sections
2012-03-05 11:36 [Bug lto/52489] New: LTO drops init_array/fini_array sections krisztian.kocsis at optimaster dot eu
@ 2012-03-05 11:44 ` rguenth at gcc dot gnu.org
2012-03-05 12:47 ` krisztian.kocsis at optimaster dot eu
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-05 11:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52489
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
Depends on| |51255
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-05 11:43:47 UTC ---
Does the error persist if you enable -fuse-linker-plugin? Btw, it works for me
even without. I suspect it's a binutils bug instead?
Honza?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/52489] LTO drops init_array/fini_array sections
2012-03-05 11:36 [Bug lto/52489] New: LTO drops init_array/fini_array sections krisztian.kocsis at optimaster dot eu
2012-03-05 11:44 ` [Bug lto/52489] " rguenth at gcc dot gnu.org
@ 2012-03-05 12:47 ` krisztian.kocsis at optimaster dot eu
2012-03-05 13:36 ` krisztian.kocsis at optimaster dot eu
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: krisztian.kocsis at optimaster dot eu @ 2012-03-05 12:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52489
--- Comment #2 from Krisztian Kocsis <krisztian.kocsis at optimaster dot eu> 2012-03-05 12:46:47 UTC ---
It seems that it works with -fno-use-linker-plugin - strane :S
Now I will try to check some other things.
I think it is not a linker bug because if a save temp files the .s file does
not contain the .init_array section while when -flto is not included it does
contain this section.
I will attach them after I made the checks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/52489] LTO drops init_array/fini_array sections
2012-03-05 11:36 [Bug lto/52489] New: LTO drops init_array/fini_array sections krisztian.kocsis at optimaster dot eu
2012-03-05 11:44 ` [Bug lto/52489] " rguenth at gcc dot gnu.org
2012-03-05 12:47 ` krisztian.kocsis at optimaster dot eu
@ 2012-03-05 13:36 ` krisztian.kocsis at optimaster dot eu
2012-03-05 13:39 ` krisztian.kocsis at optimaster dot eu
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: krisztian.kocsis at optimaster dot eu @ 2012-03-05 13:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52489
--- Comment #3 from Krisztian Kocsis <krisztian.kocsis at optimaster dot eu> 2012-03-05 13:35:38 UTC ---
Created attachment 26832
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26832
Generated files with -fuse-linker-plugin
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/52489] LTO drops init_array/fini_array sections
2012-03-05 11:36 [Bug lto/52489] New: LTO drops init_array/fini_array sections krisztian.kocsis at optimaster dot eu
` (2 preceding siblings ...)
2012-03-05 13:36 ` krisztian.kocsis at optimaster dot eu
@ 2012-03-05 13:39 ` krisztian.kocsis at optimaster dot eu
2012-03-05 13:40 ` krisztian.kocsis at optimaster dot eu
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: krisztian.kocsis at optimaster dot eu @ 2012-03-05 13:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52489
--- Comment #4 from Krisztian Kocsis <krisztian.kocsis at optimaster dot eu> 2012-03-05 13:39:08 UTC ---
Created attachment 26833
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26833
Generated files with -fno-use-linker-plugin
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/52489] LTO drops init_array/fini_array sections
2012-03-05 11:36 [Bug lto/52489] New: LTO drops init_array/fini_array sections krisztian.kocsis at optimaster dot eu
` (3 preceding siblings ...)
2012-03-05 13:39 ` krisztian.kocsis at optimaster dot eu
@ 2012-03-05 13:40 ` krisztian.kocsis at optimaster dot eu
2012-03-05 13:47 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: krisztian.kocsis at optimaster dot eu @ 2012-03-05 13:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52489
--- Comment #5 from Krisztian Kocsis <krisztian.kocsis at optimaster dot eu> 2012-03-05 13:40:18 UTC ---
Ok, I can confirm that it work if plugins are disabled or
-fno-use-linker-plugin is used. When linker plugin is used gcc drops these
sections.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/52489] LTO drops init_array/fini_array sections
2012-03-05 11:36 [Bug lto/52489] New: LTO drops init_array/fini_array sections krisztian.kocsis at optimaster dot eu
` (4 preceding siblings ...)
2012-03-05 13:40 ` krisztian.kocsis at optimaster dot eu
@ 2012-03-05 13:47 ` rguenth at gcc dot gnu.org
2012-03-05 13:50 ` krisztian.kocsis at optimaster dot eu
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-05 13:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52489
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2012-03-05
Ever Confirmed|0 |1
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-05 13:46:57 UTC ---
(In reply to comment #5)
> Ok, I can confirm that it work if plugins are disabled or
> -fno-use-linker-plugin is used. When linker plugin is used gcc drops these
> sections.
What binutils version are you using? It seems to me that this is a binutils
bug, not a GCC bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/52489] LTO drops init_array/fini_array sections
2012-03-05 11:36 [Bug lto/52489] New: LTO drops init_array/fini_array sections krisztian.kocsis at optimaster dot eu
` (5 preceding siblings ...)
2012-03-05 13:47 ` rguenth at gcc dot gnu.org
@ 2012-03-05 13:50 ` krisztian.kocsis at optimaster dot eu
2012-03-05 18:41 ` pinskia at gcc dot gnu.org
2021-12-11 18:59 ` pinskia at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: krisztian.kocsis at optimaster dot eu @ 2012-03-05 13:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52489
--- Comment #7 from Krisztian Kocsis <krisztian.kocsis at optimaster dot eu> 2012-03-05 13:50:25 UTC ---
Binutils 2.22
Pls check the attached files.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/52489] LTO drops init_array/fini_array sections
2012-03-05 11:36 [Bug lto/52489] New: LTO drops init_array/fini_array sections krisztian.kocsis at optimaster dot eu
` (6 preceding siblings ...)
2012-03-05 13:50 ` krisztian.kocsis at optimaster dot eu
@ 2012-03-05 18:41 ` pinskia at gcc dot gnu.org
2021-12-11 18:59 ` pinskia at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-03-05 18:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52489
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |DUPLICATE
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-03-05 18:39:30 UTC ---
It is the same as PR 51255.
*** This bug has been marked as a duplicate of bug 51255 ***
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/52489] LTO drops init_array/fini_array sections
2012-03-05 11:36 [Bug lto/52489] New: LTO drops init_array/fini_array sections krisztian.kocsis at optimaster dot eu
` (7 preceding siblings ...)
2012-03-05 18:41 ` pinskia at gcc dot gnu.org
@ 2021-12-11 18:59 ` pinskia at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-11 18:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52489
Bug 52489 depends on bug 51255, which changed state.
Bug 51255 Summary: Using -fwhole-program breaks code which puts values in .ctors or .init_array
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51255
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
^ permalink raw reply [flat|nested] 10+ messages in thread