aboutsummaryrefslogtreecommitdiff
path: root/gold/reloc.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/reloc.cc
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/reloc.cc')
-rw-r--r--gold/reloc.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/gold/reloc.cc b/gold/reloc.cc
index 617573d..8879f0a 100644
--- a/gold/reloc.cc
+++ b/gold/reloc.cc
@@ -1106,14 +1106,17 @@ Sized_relobj<size, big_endian>::split_stack_adjust_reltype(
// cases we will ask for a large stack unnecessarily, but this
// is not fatal. FIXME: Some targets have symbols which are
// functions but are not type STT_FUNC, e.g., STT_ARM_TFUNC.
- if (gsym->type() == elfcpp::STT_FUNC
- && !gsym->is_undefined()
+ if (!gsym->is_undefined()
&& gsym->source() == Symbol::FROM_OBJECT
&& !gsym->object()->uses_split_stack())
{
- section_offset_type offset =
- convert_to_section_size_type(reloc.get_r_offset());
- non_split_refs.push_back(offset);
+ unsigned int r_type = elfcpp::elf_r_type<size>(reloc.get_r_info());
+ if (parameters->target().is_call_to_non_split(gsym, r_type))
+ {
+ section_offset_type offset =
+ convert_to_section_size_type(reloc.get_r_offset());
+ non_split_refs.push_back(offset);
+ }
}
}