diff options
author | Ian Lance Taylor <ian@airs.com> | 2010-03-11 01:10:53 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2010-03-11 01:10:53 +0000 |
commit | b6848d3c09394cfc3ce9efd4847e1e33a43d51dd (patch) | |
tree | c849af13e3c244807b6bc58571040423d1bcab6f /gold/target.cc | |
parent | e469c7fb687b55ecd0d6048cbb9134a00b7f03d8 (diff) | |
download | gdb-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/target.cc')
-rw-r--r-- | gold/target.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gold/target.cc b/gold/target.cc index 0ddc13d..e774f63 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 |