diff options
author | Ulrich Drepper <drepper@gcc.gnu.org> | 2000-04-05 07:34:36 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@gcc.gnu.org> | 2000-04-05 07:34:36 +0000 |
commit | 6a9c5260e107891b2f847e453f405d5198206f2e (patch) | |
tree | 3582fb5cb908ca50f795ffd2075ae613776b0fcc /gcc/crtstuff.c | |
parent | 05ecd0e9ab53c460dd64ea7c2c2403854d244874 (diff) | |
download | gcc-6a9c5260e107891b2f847e453f405d5198206f2e.tar.gz |
acconfig.h: Add HAVE_GAS_HIDDEN.
* 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.
From-SVN: r32925
Diffstat (limited to 'gcc/crtstuff.c')
-rw-r--r-- | gcc/crtstuff.c | 13 |
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; |