Blame SOURCES/glibc-fedora-elf-init-hidden_undef.patch

147e83
* Fri May 29 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-44
147e83
- make __init_array_start etc. symbols in elf-init.oS hidden undefined
147e83
147e83
diff -Nru glibc-2.17-c758a686/csu/elf-init.c glibc-2.17-c758a686/csu/elf-init.c
147e83
--- glibc-2.17-c758a686/csu/elf-init.c	2012-06-05 07:42:49.000000000 -0600
147e83
+++ glibc-2.17-c758a686/csu/elf-init.c	2012-06-07 12:15:21.570319597 -0600
147e83
@@ -63,6 +63,23 @@ extern void (*__init_array_end []) (int,
147e83
 extern void (*__fini_array_start []) (void) attribute_hidden;
147e83
 extern void (*__fini_array_end []) (void) attribute_hidden;
147e83
 
147e83
+#if defined HAVE_VISIBILITY_ATTRIBUTE \
147e83
+    && (defined SHARED || defined LIBC_NONSHARED)
147e83
+# define hidden_undef_2(x) #x
147e83
+# define hidden_undef_1(x) hidden_undef_2 (x)
147e83
+# define hidden_undef(x) \
147e83
+  __asm (hidden_undef_1 (ASM_GLOBAL_DIRECTIVE) " " #x); \
147e83
+  __asm (".hidden " #x);
147e83
+#else
147e83
+# define hidden_undef(x)
147e83
+#endif
147e83
+
147e83
+hidden_undef (__preinit_array_start)
147e83
+hidden_undef (__preinit_array_end)
147e83
+hidden_undef (__init_array_start)
147e83
+hidden_undef (__init_array_end)
147e83
+hidden_undef (__fini_array_start)
147e83
+hidden_undef (__fini_array_end)
147e83
 
147e83
 /* These function symbols are provided for the .init/.fini section entry
147e83
    points automagically by the linker.  */