PPC gold doesn't check for overflow properly

* powerpc.cc (Target_powerpc::Relocate::relocate): Correct test
	for undefined weaks.
This commit is contained in:
Alan Modra 2014-11-21 08:15:04 +10:30
parent 344d1e9ca8
commit 3ffaac206b
2 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2014-11-21 Alan Modra <amodra@gmail.com>
* powerpc.cc (Target_powerpc::Relocate::relocate): Correct test
for undefined weaks.
2014-11-20 Alan Modra <amodra@gmail.com>
* powerpc.cc (Stub_control::Stub_control): Init stub14_group_size_

View File

@ -7672,10 +7672,10 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
break;
}
if (status != Powerpc_relocate_functions<size, big_endian>::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"));