olga / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone

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

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