Mark __dso_handle hidden if assembler supports it.
authorH.J. Lu <hongjiu.lu@intel.com>
Wed, 15 Jun 2011 15:50:22 +0000 (15:50 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Wed, 15 Jun 2011 15:50:22 +0000 (08:50 -0700)
2011-06-15  H.J. Lu  <hongjiu.lu@intel.com>

PR c++/49412
* decl.c (get_dso_handle_node): Mark __dso_handle hidden if
assembler supports hidden visibility.

From-SVN: r175080

gcc/cp/ChangeLog
gcc/cp/decl.c

index 88bb8fb35a093bbcadd75694824b95fb8121ff0c..9ed50863a3736092d53d1e1a3b14d1c7b217de1b 100644 (file)
@@ -1,3 +1,9 @@
+2011-06-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR c++/49412
+       * decl.c (get_dso_handle_node): Mark __dso_handle hidden if
+       assembler supports hidden visibility.
+
 2011-06-14  Jason Merrill  <jason@redhat.com>
 
        PR c++/49107
index 3ccefb901e1e3ae5fcc08e05da3d1f5c76fda958..29edbe3865c463fed1f26891442e8fd5ad90153a 100644 (file)
@@ -6435,6 +6435,11 @@ get_dso_handle_node (void)
   dso_handle_node = declare_global_var (get_identifier ("__dso_handle"),
                                        ptr_type_node);
 
+#ifdef HAVE_GAS_HIDDEN
+  DECL_VISIBILITY (dso_handle_node) = VISIBILITY_HIDDEN;
+  DECL_VISIBILITY_SPECIFIED (dso_handle_node) = 1;
+#endif
+
   return dso_handle_node;
 }