소스 검색

Move __SSP__ check to header

Peter S. Mazinger 18 년 전
부모
커밋
3b7927d66f
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 0 3
      ldso/ldso/ldso.c
  2. 3 0
      libc/sysdeps/linux/common/dl-osinfo.h

+ 0 - 3
ldso/ldso/ldso.c

@@ -86,9 +86,6 @@ static int nlist; /* # items in init_fini_list */
 extern void _start(void);
 
 #ifdef __UCLIBC_HAS_SSP__
-#ifdef __SSP__
-#error "file must not be compiled with stack protection enabled on it. Use -fno-stack-protector"
-#endif
 #include <dl-osinfo.h>
 #ifndef THREAD_SET_STACK_GUARD
 /* Only exported for architectures that don't store the stack guard canary

+ 3 - 0
libc/sysdeps/linux/common/dl-osinfo.h

@@ -24,6 +24,9 @@
 #define GETTIMEOFDAY gettimeofday
 #endif
 #else
+#ifdef __SSP__
+#error "file must not be compiled with stack protection enabled on it. Use -fno-stack-protector"
+#endif
 #ifndef __SSP_QUICK_CANARY__
 #define OPEN _dl_open
 #define READ _dl_read