diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fb65fb48a2e..0497ecf70b2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-04-12 Richard Sandiford + + * config/mips/mips.c (mips_ok_for_lazy_binding_p): Always return + false for locally-binding symbols. + (mips_dangerous_for_la25_p): Check mips_global_symbol_p. + 2007-04-12 Richard Sandiford * config/mips/mips-protos.h (SYMBOL_GOT_LOCAL): Rename to... diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index d7dbd2eb651..f782d75f1fa 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -3367,9 +3367,7 @@ mips_ok_for_lazy_binding_p (rtx x) { return (TARGET_USE_GOT && GET_CODE (x) == SYMBOL_REF - && (TARGET_ABSOLUTE_ABICALLS - ? !mips_symbol_binds_local_p (x) - : mips_global_symbol_p (x))); + && !mips_symbol_binds_local_p (x)); } /* Load function address ADDR into register DEST. SIBCALL_P is true @@ -7630,7 +7628,10 @@ mips_cannot_change_mode_class (enum machine_mode from, bool mips_dangerous_for_la25_p (rtx x) { - return !TARGET_EXPLICIT_RELOCS && mips_ok_for_lazy_binding_p (x); + return (!TARGET_EXPLICIT_RELOCS + && TARGET_USE_GOT + && GET_CODE (x) == SYMBOL_REF + && mips_global_symbol_p (x)); } /* Implement PREFERRED_RELOAD_CLASS. */