From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 66572 invoked by alias); 25 Apr 2015 17:42:59 -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 66553 invoked by uid 48); 25 Apr 2015 17:42:56 -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:42: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: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-04/txt/msg02197.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D65886 --- Comment #11 from H.J. Lu --- (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 > > -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 >=20 > Will the LTO be required here? Or will it work without LTO too? >=20 > > Dump of assembler code for function bar: > > 0x00000000000005e0 <+0>: movl $0x1e,0x2002be(%rip) # 0x2008= a8 > > 0x00000000000005ea <+10>: retq=20=20=20 > > End of assembler dump. LTO is required only when definition and references aren't in the same file. > I've been accomplishing the same with protected visibility, but I keep > running into linker bugs, so I haven't been able to enable it by default. > Looks like the option here will be the proper solution. Protected data symbol means that it can't be pre-emptied. It doesn't mean its address won't be external. This is true for pointer to protected function. With copy relocation, address of protected data defined in the shared library may also be external. We only know that for sure at run-time: https://sourceware.org/bugzilla/show_bug.cgi?id=3D17711 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D65248 What you want is -fsymbolic with -Bsymbolic. >>From gcc-bugs-return-484646-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Apr 25 17:49:21 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 69911 invoked by alias); 25 Apr 2015 17:49:21 -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 69890 invoked by uid 48); 25 Apr 2015 17:49:17 -0000 From: "frankhb1989 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/65890] [C++03]sizeof(qualified-id) accepted when the operand denotes a non-static member Date: Sat, 25 Apr 2015 17:49:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.1 X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: minor X-Bugzilla-Who: frankhb1989 at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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/msg02198.txt.bz2 Content-length: 393 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65890 --- Comment #1 from frankhb1989 at gmail dot com --- Oops, wrong version of case pasted ... I once wanted to use this minimal one: sizeof(Tag::m); Nevertheless, the conclusion is the same for this issue. (There are other mess, e.g. Clang++ 3.6 wrongly interpret 'decltype(&(Tag::m))' as pointer to member but I think G++ is right here).