From b6848d3c09394cfc3ce9efd4847e1e33a43d51dd Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 11 Mar 2010 01:10:53 +0000 Subject: * 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. --- gold/reloc.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'gold/reloc.cc') 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::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(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); + } } } -- cgit v1.1