From 0e8048633ef3388613bbf33822f708fc7331f234 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sat, 27 Apr 2013 00:53:16 +0000 Subject: * target-reloc.h (relocate_section): If the reloc offset is out of range, pass VIEW as NULL to relocate.relocate. * arm.cc (Target_arm:Relocate::relocate): Check for a NULL view. * i386.cc (Target_i386::Relocate::relocate): Likewise. * powerpc.cc (Target_powerpc::Relocate::relocate): Likewise. * sparc.cc (Target_sparc::Relocate::relocate): Likewise. * tilegx.cc (Target_tilegx::Relocate::relocate): Likewise. * x86_64.cc (Target_x86_64::Relocate::relocate): Likewise. --- gold/sparc.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gold/sparc.cc') diff --git a/gold/sparc.cc b/gold/sparc.cc index 6db3b10..acb39cd 100644 --- a/gold/sparc.cc +++ b/gold/sparc.cc @@ -1,6 +1,6 @@ // sparc.cc -- sparc target support for gold. -// Copyright 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. +// Copyright 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. // Written by David S. Miller . // This file is part of gold. @@ -3189,6 +3189,10 @@ Target_sparc::Relocate::relocate( return false; } } + + if (view == NULL) + return true; + if (this->reloc_adjust_addr_ == view) view -= 4; -- cgit v1.1