From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16216 invoked by alias); 5 May 2015 15:03:27 -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 16151 invoked by uid 48); 5 May 2015 15:03:19 -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: Tue, 05 May 2015 15:03: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: wrong-code 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: 5.2 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-05/txt/msg00367.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #23 from Thiago Macieira --- $ 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 166164 That is, the size of the binary's text segment is 72k and the size of all the library's text segments is 162 MB (granted, this includes .rodata sections). My assertion is that keeping copy relocations is optimising for 0.05% of the codebase. I am asking that we begin reversing that decision. We can do it by opt-in, like Qt 5 tried to do: some large libraries, when they do their next binary incompatible release, enable the feature, causing the applications to stop doing copy relocations. I'd also like ld to refuse to link if copy relocations are required and the symbol comes from a library that used -fvisibility=protected -fsymbolic -Wl,-Bsymbolic (isn't that what DF_SYMBOLIC is for?)