From 8a8fdf6398b85c99dffb237e47fa577e2ddc9e77 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 11 Nov 2015 19:29:45 -0500 Subject: eliminate use of SHARED macro to suppress visibility attributes this is the first and simplest stage of removal of the SHARED macro, which will eventually allow libc.a and libc.so to be produced from the same object files. the original motivation for these #ifdefs which are now being removed was to allow building a static-only libc using a compiler that does not support visibility. however, SHARED was the wrong condition to test for this anyway; various assembly-language sources refer to hidden symbols and declare them with the .hidden directive, making it wrong to define the referenced symbols as non-hidden. if there is a need in the future to build libc using compilers that lack visibility, support could be moved to the build system or perhaps the __PIC__ macro could be checked instead of SHARED. --- src/env/__stack_chk_fail.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/env') diff --git a/src/env/__stack_chk_fail.c b/src/env/__stack_chk_fail.c index be0c184a..4de82fd9 100644 --- a/src/env/__stack_chk_fail.c +++ b/src/env/__stack_chk_fail.c @@ -17,16 +17,7 @@ void __stack_chk_fail(void) a_crash(); } -#ifdef SHARED - __attribute__((__visibility__("hidden"))) -void __stack_chk_fail_local(void) -{ - a_crash(); -} - -#else +void __stack_chk_fail_local(void); weak_alias(__stack_chk_fail, __stack_chk_fail_local); - -#endif -- cgit v1.2.1