diff mbox

PATCH: PR c++/49412: __dso_handle should be hidden

Message ID 20110615130701.GA13377@intel.com
State New
Headers show

Commit Message

H.J. Lu June 15, 2011, 1:07 p.m. UTC
Since __dso_handle is always hidden if HAVE_GAS_HIDDEN is set, it is safe
to mark __dso_handle hidden if assembler supports it.  OK for trunk?

Thanks.


H.J.
---
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.

Comments

Jason Merrill June 15, 2011, 3:10 p.m. UTC | #1
OK.

Jason
diff mbox

Patch

diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index f4988f9..17ba539 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -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;
 }