aboutsummaryrefslogtreecommitdiff
path: root/gold/target.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2010-03-11 01:10:53 +0000
committerIan Lance Taylor <ian@airs.com>2010-03-11 01:10:53 +0000
commitb6848d3c09394cfc3ce9efd4847e1e33a43d51dd (patch)
treec849af13e3c244807b6bc58571040423d1bcab6f /gold/target.h
parente469c7fb687b55ecd0d6048cbb9134a00b7f03d8 (diff)
downloadgdb-b6848d3c09394cfc3ce9efd4847e1e33a43d51dd.zip
gdb-b6848d3c09394cfc3ce9efd4847e1e33a43d51dd.tar.gz
gdb-b6848d3c09394cfc3ce9efd4847e1e33a43d51dd.tar.bz2
* reloc.cc (Sized_relobj::split_stack_adjust_reltype): Call the
target to ask whether a reference to a symbol requires a stack split. * target.h (Target::is_call_to_non_split): New function. (Target::do_is_call_to_non_split): Declare virtual function. * target.cc: Include "symtab.h". (Target::do_is_call_to_non_split): New function. * i386.cc (Target_i386::do_is_call_to_non_split): New function.
Diffstat (limited to 'gold/target.h')
-rw-r--r--gold/target.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gold/target.h b/gold/target.h
index 673153f..007b16d 100644
--- a/gold/target.h
+++ b/gold/target.h
@@ -247,6 +247,14 @@ class Target
reloc_addend(void* arg, unsigned int type, uint64_t addend) const
{ return this->do_reloc_addend(arg, type, addend); }
+ // Return true if a reference to SYM from a reloc of type R_TYPE
+ // means that the current function may call an object compiled
+ // 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, unsigned int r_type) const
+ { return this->do_is_call_to_non_split(sym, r_type); }
+
// A function starts at OFFSET in section SHNDX in OBJECT. That
// function was compiled with -fsplit-stack, but it refers to a
// function which was compiled without -fsplit-stack. VIEW is a
@@ -440,6 +448,12 @@ class Target
do_reloc_addend(void*, unsigned int, uint64_t) const
{ gold_unreachable(); }
+ // Virtual function which may be overridden by the child class. The
+ // 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, unsigned int) const;
+
// Virtual function which may be overridden by the child class.
virtual void
do_calls_non_split(Relobj* object, unsigned int, section_offset_type,