https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85801

--- Comment #7 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
(In reply to rguent...@suse.de from comment #6)

> Can't we decide that per symbol?  Or somehow force the dynamic linker to use
> the program symbol?

At what point?  We've no idea during compilation which code would go in a
shared library if its not built with -fPIC, and we've no idea which symbols
might then need to be ripped out of an anchor group.  Once in an anchor group
it isn't possible to undo that during linking (since the reference is to the
entire group and individual symbols are no longer referenced).

So this is a decision the compiler makes which the linker can never undo.

Reply via email to