* libc-symbols.h (strong_alias_asm, strong_alias): Use
ASM_GLOBAL_DIRECTIVE on the alias.
This commit is contained in:
parent
65b3cbcba7
commit
d02907df8e
|
@ -3,6 +3,8 @@ Tue Apr 18 14:00:19 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||||
* configure.in (libc_cv_asm_global_directive): New check to define
|
* configure.in (libc_cv_asm_global_directive): New check to define
|
||||||
ASM_GLOBAL_DIRECTIVE.
|
ASM_GLOBAL_DIRECTIVE.
|
||||||
* config.h.in: Add #undef ASM_GLOBAL_DIRECTIVE.
|
* config.h.in: Add #undef ASM_GLOBAL_DIRECTIVE.
|
||||||
|
* libc-symbols.h (strong_alias_asm, strong_alias): Use
|
||||||
|
ASM_GLOBAL_DIRECTIVE on the alias.
|
||||||
|
|
||||||
* sysdeps/unix/make_errlist.c (main): Don't generate "#ifdef
|
* sysdeps/unix/make_errlist.c (main): Don't generate "#ifdef
|
||||||
HAVE_WEAK_SYMBOLS" #defns.
|
HAVE_WEAK_SYMBOLS" #defns.
|
||||||
|
|
|
@ -1134,7 +1134,7 @@ if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
|
||||||
else
|
else
|
||||||
libc_cv_asm_set_directive=no
|
libc_cv_asm_set_directive=no
|
||||||
fi
|
fi
|
||||||
rm -f contest*
|
rm -f conftest*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$ac_t""$libc_cv_asm_set_directive" 1>&4
|
echo "$ac_t""$libc_cv_asm_set_directive" 1>&4
|
||||||
|
@ -1145,6 +1145,35 @@ EOF
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&4
|
||||||
|
if eval "test \"`echo '$''{'libc_cv_asm_global_directive'+set}'`\" = set"; then
|
||||||
|
echo $ac_n "(cached) $ac_c" 1>&4
|
||||||
|
else
|
||||||
|
libc_cv_asm_global_directive=UNKNOWN
|
||||||
|
for ac_globl in .globl .global; do
|
||||||
|
cat > conftest.s <<EOF
|
||||||
|
.text
|
||||||
|
${ac_globl} foo
|
||||||
|
foo: .long 0
|
||||||
|
EOF
|
||||||
|
if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
|
||||||
|
libc_cv_asm_global_directive=${ac_globl}
|
||||||
|
fi
|
||||||
|
rm -f conftest*
|
||||||
|
test $libc_cv_asm_global_directive != UNKNOWN && break
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$ac_t""$libc_cv_asm_global_directive" 1>&4
|
||||||
|
if test $libc_cv_asm_global_directive = UNKNOWN; then
|
||||||
|
{ echo "configure: error: cannot determine asm global directive" 1>&2; exit 1; }
|
||||||
|
else
|
||||||
|
cat >> confdefs.h <<EOF
|
||||||
|
#define ASM_GLOBAL_DIRECTIVE ${libc_cv_asm_global_directive}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# sysdeps configure fragments may set these with files to be linked below.
|
# sysdeps configure fragments may set these with files to be linked below.
|
||||||
libc_link_dests=
|
libc_link_dests=
|
||||||
|
|
|
@ -79,37 +79,49 @@ Cambridge, MA 02139, USA. */
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Define ALIAS as a strong alias for ORIGINAL. */
|
/* Define ALIAS as a strong alias for ORIGINAL. */
|
||||||
#ifdef HAVE_ASM_SET_DIRECTIVE
|
#ifdef HAVE_ASM_SET_DIRECTIVE
|
||||||
#define strong_alias_asm(original, alias) \
|
#define strong_alias_asm(original, alias) \
|
||||||
|
ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias); \
|
||||||
.set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original)
|
.set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original)
|
||||||
#ifdef ASSEMBLER
|
#ifdef ASSEMBLER
|
||||||
#define strong_alias(original, alias) strong_alias_asm (original, alias)
|
#define strong_alias(original, alias) strong_alias_asm (original, alias)
|
||||||
#else
|
#else
|
||||||
#define strong_alias(original, alias) \
|
#define strong_alias(original, alias) \
|
||||||
asm (".set " __SYMBOL_PREFIX #alias "," __SYMBOL_PREFIX #original);
|
asm (__string_1 (ASM_GLOBAL_DIRECTIVE) " " __SYMBOL_PREFIX #alias "\n" \
|
||||||
|
".set " __SYMBOL_PREFIX #alias "," __SYMBOL_PREFIX #original);
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define strong_alias_asm(original, alias) \
|
#define strong_alias_asm(original, alias) \
|
||||||
|
ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias); \
|
||||||
C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
|
C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
|
||||||
#ifdef ASSEMBLER
|
#ifdef ASSEMBLER
|
||||||
#define strong_alias(original, alias) strong_alias_asm (original, alias)
|
#define strong_alias(original, alias) strong_alias_asm (original, alias)
|
||||||
#else
|
#else
|
||||||
#define strong_alias(original, alias) \
|
#define strong_alias(original, alias) \
|
||||||
asm (__SYMBOL_PREFIX #alias " = " __SYMBOL_PREFIX #original);
|
asm (__string_1 (ASM_GLOBAL_DIRECTIVE) " " __SYMBOL_PREFIX #alias "\n" \
|
||||||
|
__SYMBOL_PREFIX #alias " = " __SYMBOL_PREFIX #original);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define ALIAS as a weak alias for ORIGINAL.
|
/* Helper macros used above. */
|
||||||
If weak aliases are not available, this defines a strong alias. */
|
#define __string_1(x) __string_0(x)
|
||||||
|
#define __string_0(x) #x
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_WEAK_SYMBOLS
|
#ifdef HAVE_WEAK_SYMBOLS
|
||||||
#ifdef ASSEMBLER
|
#ifdef ASSEMBLER
|
||||||
|
|
||||||
|
/* Define ALIAS as a weak alias for ORIGINAL.
|
||||||
|
If weak aliases are not available, this defines a strong alias. */
|
||||||
#define weak_alias(original, alias) \
|
#define weak_alias(original, alias) \
|
||||||
.weak C_SYMBOL_NAME (alias); \
|
.weak C_SYMBOL_NAME (alias); \
|
||||||
C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
|
C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
|
||||||
|
|
||||||
/* Declare SYMBOL to be weak. */
|
/* Declare SYMBOL to be weak. */
|
||||||
#define weak_symbol(symbol) .weak C_SYMBOL_NAME (symbol)
|
#define weak_symbol(symbol) .weak C_SYMBOL_NAME (symbol)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define weak_symbol(symbol) asm (".weak " __SYMBOL_PREFIX #symbol);
|
#define weak_symbol(symbol) asm (".weak " __SYMBOL_PREFIX #symbol);
|
||||||
#define weak_alias(original, alias) \
|
#define weak_alias(original, alias) \
|
||||||
|
|
Loading…
Reference in New Issue