diff options
author | drepper <drepper@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-05 07:34:36 +0000 |
---|---|---|
committer | drepper <drepper@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-05 07:34:36 +0000 |
commit | 5be729c90b31d337ef4646a9d270e858df02e6bb (patch) | |
tree | 3582fb5cb908ca50f795ffd2075ae613776b0fcc /gcc/crtstuff.c | |
parent | 89de664f6d3fe05005185190aa6a876c4681f177 (diff) | |
download | gcc-5be729c90b31d337ef4646a9d270e858df02e6bb.tar.gz |
* 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32925 138bc75d-0d04-0410-961f-82ee72b054a4
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; |