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

thiago at kde dot org gcc-bugzilla@gcc.gnu.org
Tue May 5 15:03:00 GMT 2015


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 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?)



More information about the Gcc-bugs mailing list