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] 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.

Copy relocation is the part of the psABI.  What you did violates the psABI,
as it is incompatible with the normal executable.

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

Link-time library != run-time library.  You can't enforce run-time behavior
at link-tome.

Reply via email to