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/i386.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/i386.cc')
-rw-r--r-- | gold/i386.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gold/i386.cc b/gold/i386.cc index e7b700c..822cc7c 100644 --- a/gold/i386.cc +++ b/gold/i386.cc @@ -171,6 +171,10 @@ class Target_i386 : public Target_freebsd<32, false> return Target::do_is_local_label_name(name); } + // Return whether SYM is call to a non-split function. + bool + do_is_call_to_non_split(const Symbol* sym, unsigned int) const; + // Adjust -fstack-split code which calls non-stack-split code. void do_calls_non_split(Relobj* object, unsigned int shndx, @@ -2776,6 +2780,18 @@ Target_i386::do_code_fill(section_size_type length) const return std::string(nops[length], length); } +// Return whether SYM should be treated as a call to a non-split +// function. We don't want that to be true of a call to a +// get_pc_thunk function. + +bool +Target_i386::do_is_call_to_non_split(const Symbol* sym, unsigned int) const +{ + return (sym->type() == elfcpp::STT_FUNC + && !this->is_defined_by_abi(sym) + && !is_prefix_of("__i686.get_pc_thunk.", sym->name())); +} + // FNOFFSET in section SHNDX in OBJECT is the start of a function // compiled with -fstack-split. The function calls non-stack-split // code. We have to change the function so that it always ensures |