From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53708 invoked by alias); 25 Apr 2015 17:30:34 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 53652 invoked by uid 48); 25 Apr 2015 17:30:31 -0000 From: "thiago at kde dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic Date: Sat, 25 Apr 2015 17:30:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: thiago at kde dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-04/txt/msg02191.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D65886 --- Comment #7 from Thiago Macieira --- (In reply to H.J. Lu from comment #4) > (In reply to Thiago Macieira from comment #3) > > Thanks H.J.! > >=20 > > Can I ask that -fsymbolic be the default? Otherwise, code with -fPIE MU= ST > > add -fsymbolic in GCC 5+, but can't add it prior because the option did= n't > > exist. Please leave that for a release or two so that we can adapt >=20 > Linux kernel has things like >=20 > M16_CFLAGS :=3D $(call cc-option, -m16, $(CODE16GCC_CFLAGS)) >=20 > It adds -m16 only if it exits. Why can't KDE do something like this? > There are many ways to achieve it and it works with all compilers. We can. The problem is not the ability, it's the need to do it. No buildsystem currently has support for -fsymbolic, since it doesn't exist yet. However, the lack of such option will produce subtle bugs. I'm asking = for a grace period until the changes propagate. I can add a runtime check to QtCore, though. > By default, GCC should be psABI compliant. -Bsymbolic isn't psABI compli= ant > since the resulting shared library doesn't work with normal executable. I > don't believe -fsymbolic should be the default, just like that -Bsymbolic > shouldn't be the default for linker either. I would argue that those should be the default and that we're optimising for the wrong thing. For example, in your email with the patch, you said: > Some experiments on google and SPEC CPU benchmarks show that the extra > instruction affects performance by 1% to 5%. You're not accounting for loss of performance in the shared libraries that can't use -Bsymbolic due to the copy relocations, both at load-time (relocations by name) and at runtime (indirect addressing to local symbols). Maybe our experiences with shared libraries isn't the same: mine is that libraries are 10x bigger and more complex than the applications using them.= =20 So I submit that your benchmarks are incomplete. >>From gcc-bugs-return-484640-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Apr 25 17:31:18 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 55911 invoked by alias); 25 Apr 2015 17:31:18 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 55597 invoked by uid 48); 25 Apr 2015 17:31:15 -0000 From: "LpSolit at netscape dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug web/64968] Upgrade GCC Bugzilla to 5.0 Date: Sat, 25 Apr 2015 17:31:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: web X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: LpSolit at netscape dot net X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: LpSolit at netscape dot net X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-04/txt/msg02192.txt.bz2 Content-length: 466 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D64968 Fr=C3=A9d=C3=A9ric Buclin changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #11 from Fr=C3=A9d=C3=A9ric Buclin --- Upgrade done. :) >>From gcc-bugs-return-484641-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Apr 25 17:33:08 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 58215 invoked by alias); 25 Apr 2015 17:33:08 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 58184 invoked by uid 48); 25 Apr 2015 17:33:04 -0000 From: "thiago at kde dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic Date: Sat, 25 Apr 2015 17:33:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: thiago at kde dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-04/txt/msg02193.txt.bz2 Content-length: 996 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D65886 --- Comment #8 from Thiago Macieira --- (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 improve shared library performance. Will do. > /export/build/gnu/gcc-5/build-x86_64-linux/gcc/xgcc > -B/export/build/gnu/gcc-5/build-x86_64-linux/gcc/ -flto -Wl,-Bsymbolic -g > -O2 -fsymbolic -shared -o libb.so b.o a.o Will the LTO be required here? Or will it work without LTO too? > Dump of assembler code for function bar: > 0x00000000000005e0 <+0>: movl $0x1e,0x2002be(%rip) # 0x2008a8= > 0x00000000000005ea <+10>: retq=20=20=20 > End of assembler dump. I've been accomplishing the same with protected visibility, but I keep runn= ing into linker bugs, so I haven't been able to enable it by default. Looks like the option here will be the proper solution. >>From gcc-bugs-return-484642-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Apr 25 17:34:28 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 59290 invoked by alias); 25 Apr 2015 17:34:28 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 59249 invoked by uid 48); 25 Apr 2015 17:34:24 -0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic Date: Sat, 25 Apr 2015 17:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-04/txt/msg02194.txt.bz2 Content-length: 700 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #9 from H.J. Lu --- (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 load-time > (relocations by name) and at runtime (indirect addressing to local symbols). > Maybe our experiences with shared libraries isn't the same: mine is that > libraries are 10x bigger and more complex than the applications using them. > > So I submit that your benchmarks are incomplete. The keyword here is psABI compliant. Since your shared library isn't psABI compliant, all bets are off.