summaryrefslogtreecommitdiffstats
path: root/gold/target.cc
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.cc
parente469c7fb687b55ecd0d6048cbb9134a00b7f03d8 (diff)
downloadppe42-binutils-b6848d3c09394cfc3ce9efd4847e1e33a43d51dd.tar.gz
ppe42-binutils-b6848d3c09394cfc3ce9efd4847e1e33a43d51dd.zip
* 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.cc')
-rw-r--r--gold/target.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/gold/target.cc b/gold/target.cc
index 0ddc13d68e..e774f63cea 100644
--- a/gold/target.cc
+++ b/gold/target.cc
@@ -21,10 +21,11 @@
// MA 02110-1301, USA.
#include "gold.h"
-#include "target.h"
+#include "elfcpp.h"
#include "dynobj.h"
+#include "symtab.h"
#include "output.h"
-#include "elfcpp.h"
+#include "target.h"
namespace gold
{
@@ -144,6 +145,16 @@ Target::do_make_output_section(const char* name, elfcpp::Elf_Word type,
return new Output_section(name, type, flags);
}
+// Default for whether a reloc is a call to a non-split function is if
+// the symbol is a function not defined by the ABI.
+
+bool
+Target::do_is_call_to_non_split(const Symbol* sym, unsigned int) const
+{
+ return (sym->type() == elfcpp::STT_FUNC
+ && !this->is_defined_by_abi(sym));
+}
+
// Default conversion for -fsplit-stack is to give an error.
void
OpenPOWER on IntegriCloud