forked from Imagelibrary/binutils-gdb
* 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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user