summaryrefslogtreecommitdiff
path: root/gold/reloc.cc
diff options
context:
space:
mode:
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 617573d4f67..8879f0a5042 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);
+ }
}
}