* 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.
This commit is contained in:
Ian Lance Taylor
2013-04-27 00:53:16 +00:00
parent 6c6b70567b
commit 0e8048633e
8 changed files with 47 additions and 9 deletions

View File

@@ -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 <davem@davemloft.net>.
// This file is part of gold.
@@ -3189,6 +3189,10 @@ Target_sparc<size, big_endian>::Relocate::relocate(
return false;
}
}
if (view == NULL)
return true;
if (this->reloc_adjust_addr_ == view)
view -= 4;