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

--- Comment #13 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Jakub Jelinek from comment #11)
> And, shouldn't common_maybe_local for i?86/x86_64 be
>   !flag_pic || (TARGET_64BIT && HAVE_LD_PIE_COPYRELOC != 0)
> ?  What about other targets that are known to generate COPY relocations in
> this case for non-PIE executables?  Should they pass !flag_pic?
> Perhaps there should be a generic default_binds_local_p* entry point that
> passes
> !flag_pic as common_maybe_local, that those targets could (after maintainers
> test it properly with various vintage linkers?) use as their
> TARGET_BINDS_LOCAL_P ?

Check flag_pic isn't necessary.  For non-PIC, the same code sequence
and relocation are used to access defined and undefined symbols, common
or not.

Reply via email to