Patchwork PATCH COMMITTED: Only put split stack support in libgcc.a

login
register
mail settings
Submitter Ian Taylor
Date Oct. 1, 2010, 7:33 p.m.
Message ID <mcrmxqxk8s2.fsf@google.com>
Download mbox | patch
Permalink /patch/66497/
State New
Headers show

Comments

Ian Taylor - Oct. 1, 2010, 7:33 p.m.
Jakub pointed out that since the split stack support uses TLS variables,
putting it in libgcc_s.so meant that every executable had a larger TLS
segment.  Since the split stack code intentionally has private
visibility, there is no real reason to put it in libgcc_s.so.  This
patch changes it to only be in libgcc.a.  Bootstrapped and tested on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian


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

	* config/t-stack(LIB2ADD_ST): Set instead of LIB2ADD.
	* config/i386/t-stack-i386 (LIB2ADD_ST): Likewise.

Patch

Index: config/i386/t-stack-i386
===================================================================
--- config/i386/t-stack-i386	(revision 164892)
+++ config/i386/t-stack-i386	(working copy)
@@ -1,2 +1,2 @@ 
 # Makefile fragment to support -fsplit-stack for x86.
-LIB2ADD += $(srcdir)/config/i386/morestack.S
+LIB2ADD_ST += $(srcdir)/config/i386/morestack.S
Index: config/t-stack
===================================================================
--- config/t-stack	(revision 164892)
+++ config/t-stack	(working copy)
@@ -1,4 +1,4 @@ 
 # Makefile fragment to provide generic support for -fsplit-stack.
 # This should be used in config.host for any host which supports
 # -fsplit-stack.
-LIB2ADD += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c
+LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c