fb633e
* Fri May 29 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-44
fb633e
- make __init_array_start etc. symbols in elf-init.oS hidden undefined
fb633e
fb633e
diff -Nrup a/csu/elf-init.c b/csu/elf-init.c
fb633e
--- a/csu/elf-init.c	2012-06-05 07:42:49.000000000 -0600
fb633e
+++ b/csu/elf-init.c	2012-06-07 12:15:21.570319597 -0600
Siddhesh Poyarekar 3cd9b9
@@ -62,6 +62,23 @@ extern void _fini (void);
Siddhesh Poyarekar 3cd9b9
    programs, this module will come from libc_nonshared.a and differs from
Siddhesh Poyarekar 3cd9b9
    the libc.a module in that it doesn't call the preinit array.  */
fb633e
 
fb633e
+#if defined HAVE_VISIBILITY_ATTRIBUTE \
fb633e
+    && (defined SHARED || defined LIBC_NONSHARED)
fb633e
+# define hidden_undef_2(x) #x
fb633e
+# define hidden_undef_1(x) hidden_undef_2 (x)
fb633e
+# define hidden_undef(x) \
fb633e
+  __asm (hidden_undef_1 (ASM_GLOBAL_DIRECTIVE) " " #x); \
fb633e
+  __asm (".hidden " #x);
fb633e
+#else
fb633e
+# define hidden_undef(x)
fb633e
+#endif
fb633e
+
fb633e
+hidden_undef (__preinit_array_start)
fb633e
+hidden_undef (__preinit_array_end)
fb633e
+hidden_undef (__init_array_start)
fb633e
+hidden_undef (__init_array_end)
fb633e
+hidden_undef (__fini_array_start)
fb633e
+hidden_undef (__fini_array_end)
fb633e
 
Siddhesh Poyarekar 3cd9b9
 void
Siddhesh Poyarekar 3cd9b9
 __libc_csu_init (int argc, char **argv, char **envp)