OSDN Git Service

Hope I have it correct now w/ native gcc4 ssp
authorPeter S. Mazinger <ps.m@gmx.net>
Mon, 9 Jan 2006 19:45:23 +0000 (19:45 -0000)
committerPeter S. Mazinger <ps.m@gmx.net>
Mon, 9 Jan 2006 19:45:23 +0000 (19:45 -0000)
libc/sysdeps/linux/common/Makefile.in
libc/sysdeps/linux/common/ssp-local.c
libc/sysdeps/linux/common/ssp.c

index b287d5d..5d3d1e2 100644 (file)
@@ -14,19 +14,17 @@ ifeq ($(EXCLUDE_BRK),y)
 CSRC:=$(filter-out sbrk.c,$(CSRC))
 endif
 
-COMMON_SSP:=ssp.c ssp-local.c
-
 # full list
 #COMMON_NO_MULTI:=getcwd.c getrlimit.c getrlimit64.c setrlimit.c setrlimit64.c getpriority.c getpriority64.c setpriority.c getrusage.c wait4.c getitimer.c setitimer.c open.c open64.c uname.c __syscall_fcntl.c __syscall_fcntl64.c
 COMMON_NO_MULTI:=getrlimit.c getrlimit64.c setrlimit.c setrlimit64.c getpriority.c setpriority.c getrusage.c getitimer.c setitimer.c uname.c __syscall_rt_sigaction.c
 
+CSRC:=$(filter-out ssp-local.c,$(CSRC))
 ifneq ($(UCLIBC_HAS_SSP),y)
-CSRC:=$(filter-out $(COMMON_SSP),$(CSRC))
+CSRC:=$(filter-out ssp.c,$(CSRC))
 endif
 
 ifneq ($(DOMULTI),n)
 CSRC:=$(filter-out $(COMMON_NO_MULTI),$(CSRC))
-CSRC:=$(filter-out $(COMMON_SSP),$(CSRC))
 endif
 
 # fails for some reason
@@ -42,11 +40,11 @@ COMMON_OBJ:=$(patsubst %.c,$(COMMON_OUT)/%.o,$(CSRC))
 
 libc-a-y+=$(COMMON_OBJ)
 libc-so-y+=$(COMMON_OBJ:.o=.os)
+libc-static-$(UCLIBC_HAS_SSP)+=$(COMMON_OUT)/ssp-local.o
 libc-nonshared-$(UCLIBC_HAS_SSP)+=$(COMMON_OUT)/ssp-local.os
 
 libc-multi-y+=$(COMMON_SRC)
 libc-nomulti-y+=$(patsubst %.c,$(COMMON_OUT)/%.o,$(COMMON_NO_MULTI))
-libc-nomulti-$(UCLIBC_HAS_SSP)+=$(patsubst %.c,$(COMMON_OUT)/%.o,$(COMMON_SSP))
 
 objclean-y+=common_objclean
 
index 11ae654..091c34c 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <features.h>
 
-extern void __stack_chk_fail_internal (void) attribute_noreturn;
+extern void __stack_chk_fail (void) attribute_noreturn;
 
 /* On some architectures, this helps needless PIC pointer setup
    that would be needed just for the __stack_chk_fail call.  */
@@ -31,5 +31,5 @@ extern void __stack_chk_fail_internal (void) attribute_noreturn;
 void attribute_noreturn attribute_hidden
 __stack_chk_fail_local (void)
 {
-  __stack_chk_fail_internal ();
+  __stack_chk_fail ();
 }
index 9efcd1a..ecd9dd8 100644 (file)
@@ -88,7 +88,7 @@ void attribute_noreturn __stack_smash_handler(char func[], int damaged)
                terminate();
 }
 
-void attribute_noreturn attribute_hidden __stack_chk_fail_internal(void)
+void attribute_noreturn __stack_chk_fail(void)
 {
        static const char msg1[] = "stack smashing detected: ";
        static const char msg3[] = " terminated";
@@ -101,7 +101,6 @@ void attribute_noreturn attribute_hidden __stack_chk_fail_internal(void)
        while(1)
                terminate();
 }
-strong_alias(__stack_chk_fail_internal,__stack_chk_fail)
 
 #if 0
 void attribute_noreturn __chk_fail(void)