From: Cary Coutant Date: Fri, 11 Dec 2015 22:20:41 +0000 (-0800) Subject: Pass relocations to Target::do_calls_non_split. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6e0813d359c6eaddc481b3b902ca4ccc1251febe;p=binutils-gdb.git 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. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index fb1d3d08db0..e039ab1d097 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,16 @@ +2015-12-11 Cary Coutant + + * 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 * object.cc (Sized_relobj_file::Sized_relobj_file): Initialize diff --git a/gold/i386.cc b/gold/i386.cc index 8cc724460ca..e0809a42891 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 59d04b3c25d..71e38f96092 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -631,6 +631,7 @@ class Target_powerpc : public Sized_target 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::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::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 b83a9629d77..c0c06c5ce6f 100644 --- a/gold/reloc.cc +++ b/gold/reloc.cc @@ -1364,6 +1364,7 @@ Sized_relobj_file::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 f558c5e8739..19d001c0c61 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 6e08f381a96..d28491cecdf 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 12c65524b75..f260e74c0bc 100644 --- a/gold/x86_64.cc +++ b/gold/x86_64.cc @@ -561,6 +561,7 @@ class Target_x86_64 : public Sized_target 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::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,