From: Alan Modra Date: Thu, 20 Nov 2014 21:45:04 +0000 (+1030) Subject: PPC gold doesn't check for overflow properly X-Git-Tag: binutils-2_25~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31dc064778e3ab3ee10421f73711e620a1bcb653;p=thirdparty%2Fbinutils-gdb.git PPC gold doesn't check for overflow properly * powerpc.cc (Target_powerpc::Relocate::relocate): Correct test for undefined weaks. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 9bb57c00b1e..ff5d5afc77a 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2014-11-21 Alan Modra + + * powerpc.cc (Target_powerpc::Relocate::relocate): Correct test + for undefined weaks. + 2014-11-20 Alan Modra * powerpc.cc (Stub_control::Stub_control): Init stub14_group_size_ diff --git a/gold/powerpc.cc b/gold/powerpc.cc index 0442e56081f..4c90e389b85 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -7672,10 +7672,10 @@ Target_powerpc::Relocate::relocate( break; } if (status != Powerpc_relocate_functions::STATUS_OK - && !has_stub_value - && !(gsym != NULL - && gsym->is_weak_undefined() - && is_branch_reloc(r_type))) + && (has_stub_value + || !(gsym != NULL + && gsym->is_weak_undefined() + && is_branch_reloc(r_type)))) { gold_error_at_location(relinfo, relnum, rela.get_r_offset(), _("relocation overflow"));