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
This commit is contained in:
parent
05ecd0e9ab
commit
6a9c5260e1
5 changed files with 54 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
26
gcc/configure
vendored
26
gcc/configure
vendored
|
@ -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"
|
||||
|
|
|
@ -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],
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue