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

--- Comment #8 from rguenther at suse dot de <rguenther at suse dot de> ---
On May 16, 2018 6:27:37 PM GMT+02:00, "rearnsha at gcc dot gnu.org"
<gcc-bugzi...@gcc.gnu.org> wrote:
>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.

Sure. So I'd say common symbols that are exported may not be in an anchor
group? 

What do we do with weak globals? Or generally with interposable symbols in
non-PIC code?

Reply via email to