aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/libgcc/config/i386/cpuinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/libgcc/config/i386/cpuinfo.c')
-rw-r--r--gcc-4.9/libgcc/config/i386/cpuinfo.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc-4.9/libgcc/config/i386/cpuinfo.c b/gcc-4.9/libgcc/config/i386/cpuinfo.c
index 6ff7502bb..3cfda0270 100644
--- a/gcc-4.9/libgcc/config/i386/cpuinfo.c
+++ b/gcc-4.9/libgcc/config/i386/cpuinfo.c
@@ -34,6 +34,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#endif
int __cpu_indicator_init (void)
+#if !defined(SHARED)
+ __attribute__ ((visibility("hidden")))
+#endif
__attribute__ ((constructor CONSTRUCTOR_PRIORITY));
/* Processor Vendor and Models. */
@@ -99,13 +102,16 @@ enum processor_features
FEATURE_FMA
};
+#if !defined(SHARED)
+ __attribute__ ((visibility("hidden")))
+#endif
struct __processor_model
{
unsigned int __cpu_vendor;
unsigned int __cpu_type;
unsigned int __cpu_subtype;
unsigned int __cpu_features[1];
-} __cpu_model;
+} __cpu_model = { };
/* Get the specific type of AMD CPU. */
@@ -321,6 +327,9 @@ __get_cpuid_output (unsigned int __level,
needs to be called explicitly there. */
int __attribute__ ((constructor CONSTRUCTOR_PRIORITY))
+#if !defined(SHARED)
+ __attribute__ ((visibility("hidden")))
+#endif
__cpu_indicator_init (void)
{
unsigned int eax, ebx, ecx, edx;
@@ -403,3 +412,8 @@ __cpu_indicator_init (void)
return 0;
}
+
+#if defined SHARED && defined USE_ELF_SYMVER
+__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0");
+__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0");
+#endif