+2016-02-06 Marcin Kościelnicki <koriakin@0x04.net>
+
+ * i386.cc (Target_i386::is_call_to_non_split): Add view and view_size
+ parameters.
+ * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Pass view
+ and view_size to is_call_to_non_split.
+ * target.cc (Target::is_call_to_non_split): Add view and view_size
+ parameters.
+ * target.h (class Target): Likewise.
+
2016-02-05 Sriraman Tallam <tmsriram@google.com>
* icf.cc (get_rel_addend): New function.
// Return whether SYM is call to a non-split function.
bool
- do_is_call_to_non_split(const Symbol* sym, const unsigned char*) const;
+ do_is_call_to_non_split(const Symbol* sym, const unsigned char*,
+ const unsigned char*, section_size_type) const;
// Adjust -fsplit-stack code which calls non-split-stack code.
void
bool
Target_i386::do_is_call_to_non_split(const Symbol* sym,
- const unsigned char*) const
+ const unsigned char*,
+ const unsigned char*,
+ section_size_type) const
{
return (sym->type() == elfcpp::STT_FUNC
&& !is_prefix_of("__i686.get_pc_thunk.", sym->name()));
&& gsym->source() == Symbol::FROM_OBJECT
&& !gsym->object()->uses_split_stack())
{
- if (parameters->target().is_call_to_non_split(gsym, pr))
+ if (parameters->target().is_call_to_non_split(gsym, pr, view,
+ view_size))
{
Reltype reloc(pr);
section_offset_type offset =
// whether the symbol is a function.
bool
-Target::do_is_call_to_non_split(const Symbol* sym, const unsigned char*) const
+Target::do_is_call_to_non_split(const Symbol* sym, const unsigned char*,
+ const unsigned char*, section_size_type) const
{
return sym->type() == elfcpp::STT_FUNC;
}
// without -fsplit-stack. SYM is known to be defined in an object
// compiled without -fsplit-stack.
bool
- is_call_to_non_split(const Symbol* sym, const unsigned char* preloc) const
- { return this->do_is_call_to_non_split(sym, preloc); }
+ is_call_to_non_split(const Symbol* sym, const unsigned char* preloc,
+ const unsigned char* view,
+ section_size_type view_size) const
+ { return this->do_is_call_to_non_split(sym, preloc, view, view_size); }
// A function starts at OFFSET in section SHNDX in OBJECT. That
// function was compiled with -fsplit-stack, but it refers to a
// default implementation is that any function not defined by the
// ABI is a call to a non-split function.
virtual bool
- do_is_call_to_non_split(const Symbol* sym, const unsigned char*) const;
+ do_is_call_to_non_split(const Symbol* sym, const unsigned char*,
+ const unsigned char*, section_size_type) const;
// Virtual function which may be overridden by the child class.
virtual void