This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49412] New: __dso_handle should be hidden
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 15 Jun 2011 00:21:09 +0000
- Subject: [Bug c++/49412] New: __dso_handle should be hidden
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49412
Summary: __dso_handle should be hidden
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hjl.tools@gmail.com
CC: jason@redhat.com
__dso_handle is always defined locally and hidden if
HAVE_GAS_HIDDEN is set. Does this 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;
}
make any senses?