mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-18 08:38:10 +08:00
* 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:
@ -1,3 +1,14 @@
|
|||||||
|
2013-04-26 Ian Lance Taylor <iant@google.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2013-04-26 Geoff Pike <gpike@chromium.org>
|
2013-04-26 Geoff Pike <gpike@chromium.org>
|
||||||
|
|
||||||
* gold.cc (queue_final_tasks): invoke layout->queue_build_id_tasks().
|
* gold.cc (queue_final_tasks): invoke layout->queue_build_id_tasks().
|
||||||
|
@ -8844,6 +8844,9 @@ Target_arm<big_endian>::Relocate::relocate(
|
|||||||
Arm_address address,
|
Arm_address address,
|
||||||
section_size_type view_size)
|
section_size_type view_size)
|
||||||
{
|
{
|
||||||
|
if (view == NULL)
|
||||||
|
return true;
|
||||||
|
|
||||||
typedef Arm_relocate_functions<big_endian> Arm_relocate_functions;
|
typedef Arm_relocate_functions<big_endian> Arm_relocate_functions;
|
||||||
|
|
||||||
r_type = get_real_reloc_type(r_type);
|
r_type = get_real_reloc_type(r_type);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// i386.cc -- i386 target support for gold.
|
// i386.cc -- i386 target support for gold.
|
||||||
|
|
||||||
// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
|
||||||
// Free Software Foundation, Inc.
|
// Free Software Foundation, Inc.
|
||||||
// Written by Ian Lance Taylor <iant@google.com>.
|
// Written by Ian Lance Taylor <iant@google.com>.
|
||||||
|
|
||||||
@ -2661,6 +2661,9 @@ Target_i386::Relocate::relocate(const Relocate_info<32, false>* relinfo,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (view == NULL)
|
||||||
|
return true;
|
||||||
|
|
||||||
const Sized_relobj_file<32, false>* object = relinfo->object;
|
const Sized_relobj_file<32, false>* object = relinfo->object;
|
||||||
|
|
||||||
// Pick the value to use for symbols defined in shared objects.
|
// Pick the value to use for symbols defined in shared objects.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// powerpc.cc -- powerpc target support for gold.
|
// powerpc.cc -- powerpc 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>
|
// Written by David S. Miller <davem@davemloft.net>
|
||||||
// and David Edelsohn <edelsohn@gnu.org>
|
// and David Edelsohn <edelsohn@gnu.org>
|
||||||
|
|
||||||
@ -6221,6 +6221,9 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
|
|||||||
Address address,
|
Address address,
|
||||||
section_size_type view_size)
|
section_size_type view_size)
|
||||||
{
|
{
|
||||||
|
if (view == NULL)
|
||||||
|
return true;
|
||||||
|
|
||||||
switch (this->maybe_skip_tls_get_addr_call(r_type, gsym))
|
switch (this->maybe_skip_tls_get_addr_call(r_type, gsym))
|
||||||
{
|
{
|
||||||
case Track_tls::NOT_EXPECTED:
|
case Track_tls::NOT_EXPECTED:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// sparc.cc -- sparc target support for gold.
|
// 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>.
|
// Written by David S. Miller <davem@davemloft.net>.
|
||||||
|
|
||||||
// This file is part of gold.
|
// This file is part of gold.
|
||||||
@ -3189,6 +3189,10 @@ Target_sparc<size, big_endian>::Relocate::relocate(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (view == NULL)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (this->reloc_adjust_addr_ == view)
|
if (this->reloc_adjust_addr_ == view)
|
||||||
view -= 4;
|
view -= 4;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// target-reloc.h -- target specific relocation support -*- C++ -*-
|
// target-reloc.h -- target specific relocation support -*- C++ -*-
|
||||||
|
|
||||||
// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
|
||||||
// Free Software Foundation, Inc.
|
// Free Software Foundation, Inc.
|
||||||
// Written by Ian Lance Taylor <iant@google.com>.
|
// Written by Ian Lance Taylor <iant@google.com>.
|
||||||
|
|
||||||
@ -389,12 +389,20 @@ relocate_section(
|
|||||||
psymval = &symval2;
|
psymval = &symval2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If OFFSET is out of range, still let the target decide to
|
||||||
|
// ignore the relocation. Pass in NULL as the VIEW argument so
|
||||||
|
// that it can return quickly without trashing an invalid memory
|
||||||
|
// address.
|
||||||
|
unsigned char *v = view + offset;
|
||||||
|
if (offset < 0 || static_cast<section_size_type>(offset) >= view_size)
|
||||||
|
v = NULL;
|
||||||
|
|
||||||
if (!relocate.relocate(relinfo, target, output_section, i, reloc,
|
if (!relocate.relocate(relinfo, target, output_section, i, reloc,
|
||||||
r_type, sym, psymval, view + offset,
|
r_type, sym, psymval, v, view_address + offset,
|
||||||
view_address + offset, view_size))
|
view_size))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (offset < 0 || static_cast<section_size_type>(offset) >= view_size)
|
if (v == NULL)
|
||||||
{
|
{
|
||||||
gold_error_at_location(relinfo, i, offset,
|
gold_error_at_location(relinfo, i, offset,
|
||||||
_("reloc has bad offset %zu"),
|
_("reloc has bad offset %zu"),
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// tilegx.cc -- tilegx target support for gold.
|
// tilegx.cc -- tilegx target support for gold.
|
||||||
|
|
||||||
// Copyright 2012 Free Software Foundation, Inc.
|
// Copyright 2012, 2013 Free Software Foundation, Inc.
|
||||||
// Written by Jiong Wang (jiwang@tilera.com)
|
// Written by Jiong Wang (jiwang@tilera.com)
|
||||||
|
|
||||||
// This file is part of gold.
|
// This file is part of gold.
|
||||||
@ -4327,6 +4327,9 @@ Target_tilegx<size, big_endian>::Relocate::relocate(
|
|||||||
typename elfcpp::Elf_types<size>::Elf_Addr address,
|
typename elfcpp::Elf_types<size>::Elf_Addr address,
|
||||||
section_size_type)
|
section_size_type)
|
||||||
{
|
{
|
||||||
|
if (view == NULL)
|
||||||
|
return true;
|
||||||
|
|
||||||
typedef Tilegx_relocate_functions<size, big_endian> TilegxReloc;
|
typedef Tilegx_relocate_functions<size, big_endian> TilegxReloc;
|
||||||
typename TilegxReloc::Tilegx_howto r_howto;
|
typename TilegxReloc::Tilegx_howto r_howto;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// x86_64.cc -- x86_64 target support for gold.
|
// x86_64.cc -- x86_64 target support for gold.
|
||||||
|
|
||||||
// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
|
||||||
// Free Software Foundation, Inc.
|
// Free Software Foundation, Inc.
|
||||||
// Written by Ian Lance Taylor <iant@google.com>.
|
// Written by Ian Lance Taylor <iant@google.com>.
|
||||||
|
|
||||||
@ -3230,6 +3230,9 @@ Target_x86_64<size>::Relocate::relocate(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (view == NULL)
|
||||||
|
return true;
|
||||||
|
|
||||||
const Sized_relobj_file<size, false>* object = relinfo->object;
|
const Sized_relobj_file<size, false>* object = relinfo->object;
|
||||||
|
|
||||||
// Pick the value to use for symbols defined in the PLT.
|
// Pick the value to use for symbols defined in the PLT.
|
||||||
|
Reference in New Issue
Block a user