aboutsummaryrefslogtreecommitdiff
path: root/gold/powerpc.cc
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2014-11-21 08:15:04 +1030
committerAlan Modra <amodra@gmail.com>2014-11-21 08:16:22 +1030
commit3ffaac206b7169712e1d556a881ea6730ea110a7 (patch)
treef8bc62c26fdf6aee1afe96650b897869deb6b69e /gold/powerpc.cc
parent344d1e9ca89655827ee4b1d613bd248829978def (diff)
downloadgdb-3ffaac206b7169712e1d556a881ea6730ea110a7.zip
gdb-3ffaac206b7169712e1d556a881ea6730ea110a7.tar.gz
gdb-3ffaac206b7169712e1d556a881ea6730ea110a7.tar.bz2
PPC gold doesn't check for overflow properly
* powerpc.cc (Target_powerpc::Relocate::relocate): Correct test for undefined weaks.
Diffstat (limited to 'gold/powerpc.cc')
-rw-r--r--gold/powerpc.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 0442e56..4c90e38 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -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"));