@@ -34,6 +34,9 @@
#endif
int __cpu_indicator_init (void)
+#if !defined(SHARED)
+__attribute__ ((visibility("hidden")))
+#endif
__attribute__ ((constructor CONSTRUCTOR_PRIORITY));
/* Get the specific type of AMD CPU. */
@@ -321,6 +324,9 @@
needs to be called explicitly there. */
int __attribute__ ((constructor CONSTRUCTOR_PRIORITY))
+#if !defined(SHARED)
+__attribute__ ((visibility("hidden")))
+#endif
__cpu_indicator_init (void)
Also, gold and ld have an incompatibility with symbol versioning as
discussed here: https://sourceware.org/bugzilla/show_bug.cgi?id=18703
H.J. suggested this nice fix to solve this problem where BFD ld is
always used to build libgcc_s.so.1:
You can pass -fuse-ld=bfd to build libgcc_s.so.1 on Linux:
@@ -3,4 +3,8 @@
# t-slibgcc-elf-ver and t-linux
SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver
+# Work around gold bug:
+# https://sourceware.org/bugzilla/show_bug.cgi?id=18703
+SHLIB_LDFLAGS += -fuse-ld=bfd
+
HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER