public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hongjiu.lu@intel.com>
To: gcc-patches@gcc.gnu.org
Cc: Jason Merrill <jason@redhat.com>
Subject: PATCH: PR c++/49412: __dso_handle should be hidden
Date: Wed, 15 Jun 2011 13:48:00 -0000	[thread overview]
Message-ID: <20110615130701.GA13377@intel.com> (raw)

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.

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;
 }
 

             reply	other threads:[~2011-06-15 13:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-15 13:48 H.J. Lu [this message]
2011-06-15 16:06 ` Jason Merrill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110615130701.GA13377@intel.com \
    --to=hongjiu.lu@intel.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    --cc=jason@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).