gold patch committed: Calls to __i686.get_pc_thunk.bx don't split stack

Ian Lance Taylor iant@google.com
Thu Mar 11 04:36:00 GMT 2010


When gold was changing functions to force a stack split for the i386
target, it considered a call to the function __i686.get_pc_thunk.bx to
force a stack split.  That is pointless since that function, created
by gcc, does not use any stack space.  Calls to that function appear
in any -fPIC code which refers to a global variable, so they are
fairly common.  Committed to mainline.

Ian


2010-03-10  Ian Lance Taylor  <iant@google.com>

	* 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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-diff
Size: 4937 bytes
Desc: get_pc_thunk
URL: <https://sourceware.org/pipermail/binutils/attachments/20100311/cd128372/attachment.bin>


More information about the Binutils mailing list