aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@gmail.com>2015-12-11 14:20:41 -0800
committerCary Coutant <ccoutant@gmail.com>2015-12-11 14:23:59 -0800
commit6e0813d359c6eaddc481b3b902ca4ccc1251febe (patch)
treebdaf54f3dd7530be90481e07a020f5ca8ce1cc88
parent6b2353a53a621680dc839366f4b2b4f96eccb6da (diff)
downloadgdb-6e0813d359c6eaddc481b3b902ca4ccc1251febe.zip
gdb-6e0813d359c6eaddc481b3b902ca4ccc1251febe.tar.gz
gdb-6e0813d359c6eaddc481b3b902ca4ccc1251febe.tar.bz2
Pass relocations to Target::do_calls_non_split.
gold/ * target.h (Target::calls_non_split): Add prelocs, reloc_count parameters. (Target::do_calls_non_split): Likewise. * target.cc (Target::do_calls_non_split): Likewise. * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Adjust call to Target::calls_non_split. * i386.cc (Target_i386::do_calls_non_split): Add prelocs, reloc_count parameters. * powerpc.cc (Target_powerpc::do_calls_non_split): Likewise. * x86_64.cc (Target_x86_64::do_calls_non_split): Likewise.
-rw-r--r--gold/ChangeLog13
-rw-r--r--gold/i386.cc3
-rw-r--r--gold/powerpc.cc6
-rw-r--r--gold/reloc.cc1
-rw-r--r--gold/target.cc3
-rw-r--r--gold/target.h7
-rw-r--r--gold/x86_64.cc3
7 files changed, 32 insertions, 4 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index fb1d3d0..e039ab1 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,5 +1,18 @@
2015-12-11 Cary Coutant <ccoutant@gmail.com>
+ * target.h (Target::calls_non_split): Add prelocs, reloc_count
+ parameters.
+ (Target::do_calls_non_split): Likewise.
+ * target.cc (Target::do_calls_non_split): Likewise.
+ * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Adjust
+ call to Target::calls_non_split.
+ * i386.cc (Target_i386::do_calls_non_split): Add prelocs, reloc_count
+ parameters.
+ * powerpc.cc (Target_powerpc::do_calls_non_split): Likewise.
+ * x86_64.cc (Target_x86_64::do_calls_non_split): Likewise.
+
+2015-12-11 Cary Coutant <ccoutant@gmail.com>
+
* object.cc (Sized_relobj_file::Sized_relobj_file): Initialize
output_views_.
* object.h (Object::get_output_view): New function.
diff --git a/gold/i386.cc b/gold/i386.cc
index 8cc7244..e0809a4 100644
--- a/gold/i386.cc
+++ b/gold/i386.cc
@@ -491,6 +491,7 @@ class Target_i386 : public Sized_target<32, false>
void
do_calls_non_split(Relobj* object, unsigned int shndx,
section_offset_type fnoffset, section_size_type fnsize,
+ const unsigned char* prelocs, size_t reloc_count,
unsigned char* view, section_size_type view_size,
std::string* from, std::string* to) const;
@@ -3881,6 +3882,8 @@ void
Target_i386::do_calls_non_split(Relobj* object, unsigned int shndx,
section_offset_type fnoffset,
section_size_type fnsize,
+ const unsigned char*,
+ size_t,
unsigned char* view,
section_size_type view_size,
std::string* from,
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 59d04b3..71e38f9 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -631,6 +631,7 @@ class Target_powerpc : public Sized_target<size, big_endian>
void
do_calls_non_split(Relobj* object, unsigned int shndx,
section_offset_type fnoffset, section_size_type fnsize,
+ const unsigned char* prelocs, size_t reloc_count,
unsigned char* view, section_size_type view_size,
std::string* from, std::string* to) const;
@@ -6590,6 +6591,8 @@ Target_powerpc<size, big_endian>::do_calls_non_split(
unsigned int shndx,
section_offset_type fnoffset,
section_size_type fnsize,
+ const unsigned char* prelocs,
+ size_t reloc_count,
unsigned char* view,
section_size_type view_size,
std::string* from,
@@ -6600,7 +6603,8 @@ Target_powerpc<size, big_endian>::do_calls_non_split(
{
// warn
Target::do_calls_non_split(object, shndx, fnoffset, fnsize,
- view, view_size, from, to);
+ prelocs, reloc_count, view, view_size,
+ from, to);
return;
}
diff --git a/gold/reloc.cc b/gold/reloc.cc
index b83a962..c0c06c5 100644
--- a/gold/reloc.cc
+++ b/gold/reloc.cc
@@ -1364,6 +1364,7 @@ Sized_relobj_file<size, big_endian>::split_stack_adjust_reltype(
std::string from;
std::string to;
parameters->target().calls_non_split(this, shndx, p->first, p->second,
+ prelocs, reloc_count,
view, view_size, &from, &to);
if (!from.empty())
{
diff --git a/gold/target.cc b/gold/target.cc
index f558c5e..19d001c 100644
--- a/gold/target.cc
+++ b/gold/target.cc
@@ -161,7 +161,8 @@ Target::do_is_call_to_non_split(const Symbol* sym, unsigned int) const
void
Target::do_calls_non_split(Relobj* object, unsigned int, section_offset_type,
- section_size_type, unsigned char*, section_size_type,
+ section_size_type, const unsigned char*, size_t,
+ unsigned char*, section_size_type,
std::string*, std::string*) const
{
static bool warned;
diff --git a/gold/target.h b/gold/target.h
index 6e08f38..d28491c 100644
--- a/gold/target.h
+++ b/gold/target.h
@@ -338,10 +338,12 @@ class Target
void
calls_non_split(Relobj* object, unsigned int shndx,
section_offset_type fnoffset, section_size_type fnsize,
+ const unsigned char* prelocs, size_t reloc_count,
unsigned char* view, section_size_type view_size,
std::string* from, std::string* to) const
{
- this->do_calls_non_split(object, shndx, fnoffset, fnsize, view, view_size,
+ this->do_calls_non_split(object, shndx, fnoffset, fnsize,
+ prelocs, reloc_count, view, view_size,
from, to);
}
@@ -664,7 +666,8 @@ class Target
// Virtual function which may be overridden by the child class.
virtual void
do_calls_non_split(Relobj* object, unsigned int, section_offset_type,
- section_size_type, unsigned char*, section_size_type,
+ section_size_type, const unsigned char*, size_t,
+ unsigned char*, section_size_type,
std::string*, std::string*) const;
// make_elf_object hooks. There are four versions of these for
diff --git a/gold/x86_64.cc b/gold/x86_64.cc
index 12c6552..f260e74 100644
--- a/gold/x86_64.cc
+++ b/gold/x86_64.cc
@@ -561,6 +561,7 @@ class Target_x86_64 : public Sized_target<size, false>
void
do_calls_non_split(Relobj* object, unsigned int shndx,
section_offset_type fnoffset, section_size_type fnsize,
+ const unsigned char* prelocs, size_t reloc_count,
unsigned char* view, section_size_type view_size,
std::string* from, std::string* to) const;
@@ -4597,6 +4598,8 @@ void
Target_x86_64<size>::do_calls_non_split(Relobj* object, unsigned int shndx,
section_offset_type fnoffset,
section_size_type fnsize,
+ const unsigned char*,
+ size_t,
unsigned char* view,
section_size_type view_size,
std::string* from,