aboutsummaryrefslogtreecommitdiff
path: root/gcc/crtstuff.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-04-05 07:34:36 +0000
committerUlrich Drepper <drepper@redhat.com>2000-04-05 07:34:36 +0000
commitc6b7883589a19fd374fb037d5c898d1e77d2854f (patch)
tree3582fb5cb908ca50f795ffd2075ae613776b0fcc /gcc/crtstuff.c
parent70dd294556deac6327d42cb1beedc58441644b45 (diff)
* acconfig.h: Add HAVE_GAS_HIDDEN.
* config.h: Regenerated. * configure.in: Add test for .hidden pseudo-op in gas. * configure: Regenerated. * crtstuff.c: Include auto-host.h. Emit additional .hidden pseudo-op for __dso_handle if the assembler knows about it. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@32925 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/crtstuff.c')
-rw-r--r--gcc/crtstuff.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/crtstuff.c b/gcc/crtstuff.c
index 1619e65d55c..c4a437a28ef 100644
--- a/gcc/crtstuff.c
+++ b/gcc/crtstuff.c
@@ -52,6 +52,7 @@ Boston, MA 02111-1307, USA. */
compiled for the target, and hence definitions concerning only the host
do not apply. */
+#include "auto-host.h"
#include "tm.h"
#include "tsystem.h"
@@ -132,7 +133,17 @@ typedef void (*func_ptr) (void);
#ifdef OBJECT_FORMAT_ELF
/* Declare the __dso_handle variable. It should have a unique value
- in every shared-object; in a main program its value is zero. */
+ in every shared-object; in a main program its value is zero. The
+ object should in any case be protected. This means the instance
+ in one DSO or the main program is not used in another object. The
+ dynamic linker takes care of this. */
+
+/* XXX Ideally the following should be implemented using
+ __attribute__ ((__visibility__ ("hidden")))
+ but the __attribute__ support is not yet there. */
+#ifdef HAVE_GAS_HIDDEN
+asm (".hidden\t__dso_handle");
+#endif
#ifdef CRTSTUFFS_O
void *__dso_handle = &__dso_handle;