move __stdio_exit_needed to stdio_impl.h
[musl] / src / internal / vis.h
index bf7a5b2..35855fc 100644 (file)
@@ -4,10 +4,9 @@
  * override default visibilities to reduce the size and performance costs
  * of position-independent code. */
 
-#ifndef CRT
-#ifdef SHARED
+#if !defined(CRT) && !defined(__ASSEMBLER__)
 
-/* For shared libc.so, all symbols should be protected, but some toolchains
+/* Conceptually, all symbols should be protected, but some toolchains
  * fail to support copy relocations for protected data, so exclude all
  * exported data symbols. */
 
@@ -25,16 +24,4 @@ extern char *optarg, **environ, **__environ, *tzname[2], *__tzname[2], *__progna
 
 #pragma GCC visibility push(protected)
 
-#elif defined(__PIC__)
-
-/* If building static libc.a as position-independent code, try to make
- * everything hidden except possibly-undefined weak references. */
-
-__attribute__((__visibility__("default")))
-extern void (*const __init_array_start)(), (*const __init_array_end)(),
-       (*const __fini_array_start)(), (*const __fini_array_end)();
-
-#pragma GCC visibility push(hidden)
-
-#endif
 #endif