[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2019-04-23 Thread fw at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 Florian Weimer changed: What|Removed |Added CC||fw at gcc dot gnu.org --- Comment #38

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2016-01-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 Jakub Jelinek changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-12-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 Richard Biener changed: What|Removed |Added Target Milestone|5.3 |5.4 --- Comment #36 from Richard

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-08-06 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #34 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Thiago Macieira from comment #33) gcc 5.2.1 can no longer reproduce the testcase. Has the situation changed? GCC 5 r226650 still fails for me.

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-08-06 Thread thiago at kde dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #33 from Thiago Macieira thiago at kde dot org --- gcc 5.2.1 can no longer reproduce the testcase. Has the situation changed?

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-08-06 Thread thiago at kde dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #35 from Thiago Macieira thiago at kde dot org --- I've only tried with SUSE's distro build, as my own GCC build is now GCC 6. However, I can reproduce it with my GCC 6 build. Let me investigate if OpenSUSE applied a patch.

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-07-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Target Milestone|5.2 |5.3 ---

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-06-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P2

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-05-05 Thread thiago at kde dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #27 from Thiago Macieira thiago at kde dot org --- (In reply to Jakub Jelinek from comment #26) Plus, if KDE uses so small binaries, why don't just compile them with -fPIC then? You can then link them as normal executables or PIEs,

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-05-05 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #28 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Thiago Macieira from comment #27) (In reply to Jakub Jelinek from comment #26) Plus, if KDE uses so small binaries, why don't just compile them with -fPIC then? You

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-05-05 Thread thiago at kde dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #30 from Thiago Macieira thiago at kde dot org --- (In reply to H.J. Lu from comment #28) (In reply to Thiago Macieira from comment #27) (In reply to Jakub Jelinek from comment #26) Can you guarantee that the linker won't

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-05-05 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #26 from Jakub Jelinek jakub at gcc dot gnu.org --- Plus, if KDE uses so small binaries, why don't just compile them with -fPIC then? You can then link them as normal executables or PIEs, depending on what you prefer, and still it

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-05-05 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #25 from Jakub Jelinek jakub at gcc dot gnu.org --- (In reply to Thiago Macieira from comment #23) $ pmap `pidof qtcreator` | perl -ne '@_ = split / +/; if ($_[6] eq r-xp $_[7] !~ /\[/) { $_[1] =~ s/K//; $total += $_[1]; $bin =

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-05-05 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #29 from Jakub Jelinek jakub at gcc dot gnu.org --- (In reply to Thiago Macieira from comment #27) Still, if this were solved properly, relocations that resolved back into the executable itself would still be bound locally, even

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-05-05 Thread thiago at kde dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #23 from Thiago Macieira thiago at kde dot org --- $ pmap `pidof qtcreator` | perl -ne '@_ = split / +/; if ($_[6] eq r-xp $_[7] !~ /\[/) { $_[1] =~ s/K//; $total += $_[1]; $bin = $_[1] unless $bin; } END { print $bin $total\n; }' 72

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-05-05 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #24 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Thiago Macieira from comment #23) $ pmap `pidof qtcreator` | perl -ne '@_ = split / +/; if ($_[6] eq r-xp $_[7] !~ /\[/) { $_[1] =~ s/K//; $total += $_[1]; $bin = $_[1]

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-05-05 Thread thiago at kde dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #31 from Thiago Macieira thiago at kde dot org --- (In reply to Jakub Jelinek from comment #29) You are missing the point of copy relocations. Consider: int a = 1; extern int b, c; int foo (void) { return a + b + c; }

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-29 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #22 from H.J. Lu hjl.tools at gmail dot com --- Created attachment 35427 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35427action=edit A patch to enable -fsymbolic in LTO if -Bsymbolic is used This patch improves LTO when

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-29 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #21 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Jakub Jelinek from comment #19) I know it isn't the same. But, IMHO this isn't worth adding another knob which will be a maintainance nightmare. Performance difference

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added CC||jakub at gcc dot

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-27 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Keywords||wrong-code

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-27 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #13 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Jakub Jelinek from comment #12) First of all, why is this filed as a GCC bug? And what is PIE specific on the issue? I mean, if -Bsymbolic doesn't cope well with like

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-27 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #17 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Jakub Jelinek from comment #16) (In reply to H.J. Lu from comment #15) Unless we state -Bsymbolic should never be used with GCC, we should provide a way to make PIE to

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #14 from Jakub Jelinek jakub at gcc dot gnu.org --- (In reply to H.J. Lu from comment #13) It is true that the testcase doesn't work with normal executable. I don't believe GCC is wrong to generate copy relocation in PIE. It is

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-27 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #15 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Jakub Jelinek from comment #14) As it doesn't work with normal executables, I'm not convinced we need such an option or that it is right to assume it should work. People

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #16 from Jakub Jelinek jakub at gcc dot gnu.org --- (In reply to H.J. Lu from comment #15) Unless we state -Bsymbolic should never be used with GCC, we should provide a way to make PIE to compatible with -Bsymbolic. Well, there is

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-27 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #18 from H.J. Lu hjl.tools at gmail dot com --- (In reply to H.J. Lu from comment #17) Since -Bsymbolic is allowed with PIE, we should take advantage of it. -fsymbolic -fPIE is the same as -fPIC and -fsymbolic -fPIC generates much

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #19 from Jakub Jelinek jakub at gcc dot gnu.org --- I know it isn't the same. But, IMHO this isn't worth adding another knob which will be a maintainance nightmare.

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-27 Thread thiago at kde dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #20 from Thiago Macieira thiago at kde dot org --- I've just been informed that Clang 3.6 with -fPIE -flto has the same problem, but I have not been able to reproduce. I find it unexpected that it would do that in LTO mode but not

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-25 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #11 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Thiago Macieira from comment #8) (In reply to H.J. Lu from comment #6) /export/build/gnu/gcc-5/build-x86_64-linux/gcc/xgcc

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-25 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #5 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Thiago Macieira from comment #3) Thanks H.J.! Can I ask that -fsymbolic be the default? Otherwise, code with -fPIE MUST add -fsymbolic in GCC 5+, but can't add it prior

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-25 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #6 from H.J. Lu hjl.tools at gmail dot com --- (In reply to H.J. Lu from comment #5) BTW, you should add -fsymbolic to -fPIC if the shared library will be created by -Bsymbolic. It will improve shared library performance. Here is

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-25 Thread thiago at kde dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #8 from Thiago Macieira thiago at kde dot org --- (In reply to H.J. Lu from comment #6) (In reply to H.J. Lu from comment #5) BTW, you should add -fsymbolic to -fPIC if the shared library will be created by -Bsymbolic. It will

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-25 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #9 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Thiago Macieira from comment #7) You're not accounting for loss of performance in the shared libraries that can't use -Bsymbolic due to the copy relocations, both at

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-25 Thread thiago at kde dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #7 from Thiago Macieira thiago at kde dot org --- (In reply to H.J. Lu from comment #4) (In reply to Thiago Macieira from comment #3) Thanks H.J.! Can I ask that -fsymbolic be the default? Otherwise, code with -fPIE MUST add

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-25 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #10 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Thiago Macieira from comment #7) (In reply to H.J. Lu from comment #4) (In reply to Thiago Macieira from comment #3) Thanks H.J.! Can I ask that -fsymbolic be

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-25 Thread thiago at kde dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #3 from Thiago Macieira thiago at kde dot org --- Thanks H.J.! Can I ask that -fsymbolic be the default? Otherwise, code with -fPIE MUST add -fsymbolic in GCC 5+, but can't add it prior because the option didn't exist. Please leave

[Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic

2015-04-25 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #4 from H.J. Lu hjl.tools at gmail dot com --- (In reply to Thiago Macieira from comment #3) Thanks H.J.! Can I ask that -fsymbolic be the default? Otherwise, code with -fPIE MUST add -fsymbolic in GCC 5+, but can't add it prior