Blob Blame History Raw
* Fri May 29 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-44
- make __init_array_start etc. symbols in elf-init.oS hidden undefined

diff -Nru glibc-2.17-c758a686/csu/elf-init.c glibc-2.17-c758a686/csu/elf-init.c
--- glibc-2.17-c758a686/csu/elf-init.c	2012-06-05 07:42:49.000000000 -0600
+++ glibc-2.17-c758a686/csu/elf-init.c	2012-06-07 12:15:21.570319597 -0600
@@ -63,6 +63,23 @@ extern void (*__init_array_end []) (int,
 extern void (*__fini_array_start []) (void) attribute_hidden;
 extern void (*__fini_array_end []) (void) attribute_hidden;
 
+#if defined HAVE_VISIBILITY_ATTRIBUTE \
+    && (defined SHARED || defined LIBC_NONSHARED)
+# define hidden_undef_2(x) #x
+# define hidden_undef_1(x) hidden_undef_2 (x)
+# define hidden_undef(x) \
+  __asm (hidden_undef_1 (ASM_GLOBAL_DIRECTIVE) " " #x); \
+  __asm (".hidden " #x);
+#else
+# define hidden_undef(x)
+#endif
+
+hidden_undef (__preinit_array_start)
+hidden_undef (__preinit_array_end)
+hidden_undef (__init_array_start)
+hidden_undef (__init_array_end)
+hidden_undef (__fini_array_start)
+hidden_undef (__fini_array_end)
 
 /* These function symbols are provided for the .init/.fini section entry
    points automagically by the linker.  */