Evgeny Karpov <evgeny.kar...@microsoft.com> writes: > Symbols using GOT are not supported by the aarch64-w64-mingw32 > target and should be excluded from the code models. > > gcc/ChangeLog: > > * config/aarch64/aarch64.cc (aarch64_symbol_binds_local_p): > Disable GOT for PECOFF target.
I think we should instead patch the callers that are using aarch64_symbol_binds_local_p for GOT decisions. The function itself is checking for a more general property (and one that could be useful in other contexts). Thanks, Richard > --- > gcc/config/aarch64/aarch64.cc | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc > index e4df70ddedc..7865484860b 100644 > --- a/gcc/config/aarch64/aarch64.cc > +++ b/gcc/config/aarch64/aarch64.cc > @@ -20885,6 +20885,9 @@ aarch64_tlsdesc_abi_id () > static bool > aarch64_symbol_binds_local_p (const_rtx x) > { > + if (TARGET_PECOFF) > + return true; > + > return (SYMBOL_REF_DECL (x) > ? targetm.binds_local_p (SYMBOL_REF_DECL (x)) > : SYMBOL_REF_LOCAL_P (x));