]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
acconfig.h: Add HAVE_GAS_HIDDEN.
authorUlrich Drepper <drepper@gcc.gnu.org>
Wed, 5 Apr 2000 07:34:36 +0000 (07:34 +0000)
committerUlrich Drepper <drepper@gcc.gnu.org>
Wed, 5 Apr 2000 07:34:36 +0000 (07:34 +0000)
* 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

gcc/acconfig.h
gcc/config.in
gcc/configure
gcc/configure.in
gcc/crtstuff.c

index b0a44d00acacf25beeb2705beb56cf0d7b6f025e..2d0457b6c8bf1c734d556fcb7d3e3ac3436625fa 100644 (file)
@@ -72,6 +72,9 @@
 /* Define if your assembler supports .weak.  */
 #undef HAVE_GAS_WEAK
 
+/* Define if your assembler supports .hidden.  */
+#undef HAVE_GAS_HIDDEN
+
 /* Define if your assembler uses the old HImode fild and fist notation.  */
 #undef HAVE_GAS_FILDS_FISTS
 
index 879360b882f1ad810161a352ce2ce2f8b3cbf4a8..600e76bc86b36aedd43a30e91ac8131d753d09e0 100644 (file)
@@ -73,6 +73,9 @@
 /* Define if your assembler supports .weak.  */
 #undef HAVE_GAS_WEAK
 
+/* Define if your assembler supports .hidden.  */
+#undef HAVE_GAS_HIDDEN
+
 /* Define if your assembler uses the old HImode fild and fist notation.  */
 #undef HAVE_GAS_FILDS_FISTS
 
index 0a9d6d2848011c828fbc49c8aaa0af292049b8d0..bdbf29af864068f1c3fd5f412db4e5514caf5823 100755 (executable)
@@ -8834,10 +8834,28 @@ EOF
 fi
 echo "$ac_t""$gcc_cv_as_weak" 1>&6
 
+echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
+echo "configure:8839: checking assembler hidden support" >&5
+gcc_cv_as_hidden=
+if test x$gcc_cv_as != x; then
+       # Check if we have .hidden
+       echo "  .hidden foobar" > conftest.s
+       echo "foobar:" >> conftest.s
+       if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+               cat >> confdefs.h <<\EOF
+#define HAVE_GAS_HIDDEN 1
+EOF
+
+               gcc_cv_as_hidden="yes"
+       fi
+       rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
+fi
+echo "$ac_t""$gcc_cv_as_hidden" 1>&6
+
 case "$target" in 
   sparc*-*-*)
     echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
-echo "configure:8841: checking assembler .register pseudo-op support" >&5
+echo "configure:8859: checking assembler .register pseudo-op support" >&5
 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8867,7 +8885,7 @@ EOF
     case "$tm_file" in
     *64*)
        echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
-echo "configure:8871: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
+echo "configure:8889: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
 if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8912,7 +8930,7 @@ EOF
 
     if test "x$gcc_cv_as_flags64" != xno; then
        echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
-echo "configure:8916: checking for assembler offsetable %lo() support" >&5
+echo "configure:8934: checking for assembler offsetable %lo() support" >&5
 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8951,7 +8969,7 @@ EOF
 
   i[34567]86-*-*)
     echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
-echo "configure:8955: checking assembler instructions" >&5
+echo "configure:8973: checking assembler instructions" >&5
     gcc_cv_as_instructions=
     if test x$gcc_cv_as != x; then
        set "filds fists" "filds mem; fists mem"
index 3005071abe209b25415f98c6e95deb7054e59b6b..734f4cae22eb15469193583b958fe11d67c73fc3 100644 (file)
@@ -4382,6 +4382,20 @@ if test x$gcc_cv_as != x; then
 fi
 AC_MSG_RESULT($gcc_cv_as_weak)
 
+AC_MSG_CHECKING(assembler hidden support)
+gcc_cv_as_hidden=
+if test x$gcc_cv_as != x; then
+       # Check if we have .hidden
+       echo "  .hidden foobar" > conftest.s
+       echo "foobar:" >> conftest.s
+       if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+               AC_DEFINE(HAVE_GAS_HIDDEN)
+               gcc_cv_as_hidden="yes"
+       fi
+       rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
+fi
+AC_MSG_RESULT($gcc_cv_as_hidden)
+
 case "$target" in 
   sparc*-*-*)
     AC_CACHE_CHECK([assembler .register pseudo-op support],
index 1619e65d55c5b7ba946454f97f2b9a0b5ce6db77..c4a437a28eff117edb297166d0fba3473dc32660 100644 (file)
@@ -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;