aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2012-07-10 14:30:24 +0200
committerMarek Polacek <polacek@redhat.com>2012-07-10 14:30:24 +0200
commit7b8e0d49cbfd8a911978d4b72f3d97e11a6d34ec (patch)
treeb6e8d0b491e2e4e78d1e4b41d3edadeb04392395
parentc1d00790348352d9bd342b9cebe70cb416f63798 (diff)
downloadglibc-7b8e0d49cbfd8a911978d4b72f3d97e11a6d34ec.tar.xz
glibc-7b8e0d49cbfd8a911978d4b72f3d97e11a6d34ec.zip
Get rid of ASM_GLOBAL_DIRECTIVE.
-rw-r--r--ChangeLog40
-rw-r--r--NEWS2
-rw-r--r--config.h.in4
-rwxr-xr-xconfigure45
-rw-r--r--configure.in31
-rw-r--r--elf/tst-unique1mod1.c2
-rw-r--r--elf/tst-unique1mod2.c2
-rw-r--r--elf/tst-unique2mod1.c2
-rw-r--r--elf/tst-unique2mod2.c2
-rw-r--r--include/libc-symbols.h26
-rw-r--r--locale/localeinfo.h5
-rw-r--r--sysdeps/i386/configure2
-rw-r--r--sysdeps/i386/configure.in2
-rw-r--r--sysdeps/i386/i386-mcount.S6
-rw-r--r--sysdeps/i386/sysdep.h2
-rw-r--r--sysdeps/mach/sysdep.h2
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/fprrest.S66
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/fprsave.S66
-rw-r--r--sysdeps/powerpc/powerpc32/gprrest0.S36
-rw-r--r--sysdeps/powerpc/powerpc32/gprrest1.S36
-rw-r--r--sysdeps/powerpc/powerpc32/gprsave0.S36
-rw-r--r--sysdeps/powerpc/powerpc32/gprsave1.S36
-rw-r--r--sysdeps/powerpc/powerpc32/sysdep.h6
-rw-r--r--sysdeps/s390/s390-32/s390-mcount.S4
-rw-r--r--sysdeps/s390/s390-32/sysdep.h2
-rw-r--r--sysdeps/s390/s390-64/s390x-mcount.S4
-rw-r--r--sysdeps/s390/s390-64/sysdep.h2
-rw-r--r--sysdeps/sh/_mcount.S2
-rw-r--r--sysdeps/sh/sysdep.h2
-rw-r--r--sysdeps/x86_64/_mcount.S6
-rw-r--r--sysdeps/x86_64/configure2
-rw-r--r--sysdeps/x86_64/configure.in2
-rw-r--r--sysdeps/x86_64/sysdep.h2
33 files changed, 229 insertions, 256 deletions
diff --git a/ChangeLog b/ChangeLog
index c7070c57c1..019b30d243 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,43 @@
+2012-07-10 Marek Polacek <polacek@redhat.com>
+
+ [BZ #14151]
+ * configure.in (libc_cv_asm_global_directive): Remove test. Replace
+ libc_cv_asm_global_directive with .globl.
+ * configure: Regenerated.
+ * sysdeps/i386/configure.in: Replace libc_cv_asm_global_directive
+ with .globl.
+ * sysdeps/i386/configure: Regenerated.
+ * sysdeps/x86_64/configure.in: Replace libc_cv_asm_global_directive
+ with .globl.
+ * sysdeps/x86_64/configure: Regenerated.
+ * config.h.in: Do not undefine ASM_GLOBAL_DIRECTIVE.
+ * include/libc-symbols.h: Replace ASM_GLOBAL_DIRECTIVE with .globl.
+ * elf/tst-unique2mod2.c: Likewise.
+ * elf/tst-unique2mod1.c: Likewise.
+ * elf/tst-unique1mod2.c: Likewise.
+ * elf/tst-unique1mod1.c: Likewise.
+ * sysdeps/s390/s390-32/sysdep.h: Likewise.
+ * sysdeps/s390/s390-32/s390-mcount.S: Likewise.
+ * sysdeps/s390/s390-64/sysdep.h: Likewise.
+ * sysdeps/s390/s390-64/s390x-mcount.S: Likewise.
+ * sysdeps/mach/sysdep.h: Likewise.
+ * sysdeps/i386/sysdep.h: Likewise.
+ * sysdeps/i386/i386-mcount.S: Likewise.
+ * sysdeps/x86_64/_mcount.S: Likewise.
+ * sysdeps/x86_64/sysdep.h: Likewise.
+ * sysdeps/sh/_mcount.S: Likewise.
+ * sysdeps/sh/sysdep.h: Likewise.
+ * sysdeps/powerpc/powerpc32/gprsave1.S: Likewise.
+ * sysdeps/powerpc/powerpc32/fpu/fprrest.S: Likewise.
+ * sysdeps/powerpc/powerpc32/fpu/fprsave.S: Likewise.
+ * sysdeps/powerpc/powerpc32/sysdep.h: Likewise.
+ * sysdeps/powerpc/powerpc32/gprrest1.S: Likewise.
+ * sysdeps/powerpc/powerpc32/gprsave0.S: Likewise.
+ * sysdeps/powerpc/powerpc32/gprrest0.S: Likewise.
+ * locale/localeinfo.h: Likewise.
+ (_NL_CURRENT_DEFINE_STRINGIFY): Delete macro.
+ (_NL_CURRENT_DEFINE_STRINGIFY_1): Likewise.
+
2012-07-09 Roland McGrath <roland@hack.frob.com>
[BZ #14336]
diff --git a/NEWS b/NEWS
index 55ebcbdf69..bd5b3786c6 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ Version 2.17
* The following bugs are resolved with this release:
- 6778, 14042, 14154, 14157, 14283, 14328, 14331, 14337
+ 6778, 14042, 14151, 14154, 14157, 14283, 14328, 14331, 14337
Version 2.16
diff --git a/config.h.in b/config.h.in
index dd184b0cf4..22c62db9e0 100644
--- a/config.h.in
+++ b/config.h.in
@@ -37,10 +37,6 @@
/* Define if the assembler supports the `.set' directive. */
#undef HAVE_ASM_SET_DIRECTIVE
-/* Define to the name of the assembler's directive for
- declaring a symbol global (default `.globl'). */
-#undef ASM_GLOBAL_DIRECTIVE
-
/* Define to the prefix before `object' or `function' in the
assembler's `.type' directive, if it has one. */
#undef ASM_TYPE_DIRECTIVE_PREFIX
diff --git a/configure b/configure
index aa7869ff17..1268168699 100755
--- a/configure
+++ b/configure
@@ -4076,41 +4076,6 @@ else
$as_echo "yes" >&6; }
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler global-symbol directive" >&5
-$as_echo_n "checking for assembler global-symbol directive... " >&6; }
-if ${libc_cv_asm_global_directive+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- libc_cv_asm_global_directive=UNKNOWN
-for ac_globl in .globl .global .EXPORT; do
- cat > conftest.s <<EOF
- ${libc_cv_dot_text}
- ${ac_globl} foo
-foo:
-EOF
- if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- libc_cv_asm_global_directive=${ac_globl}
- fi
- rm -f conftest*
- test $libc_cv_asm_global_directive != UNKNOWN && break
-done
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_global_directive" >&5
-$as_echo "$libc_cv_asm_global_directive" >&6; }
-if test $libc_cv_asm_global_directive = UNKNOWN; then
- as_fn_error $? "cannot determine asm global directive" "$LINENO" 5
-else
- cat >>confdefs.h <<_ACEOF
-#define ASM_GLOBAL_DIRECTIVE ${libc_cv_asm_global_directive}
-_ACEOF
-
-fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .type directive prefix" >&5
$as_echo_n "checking for assembler .type directive prefix... " >&6; }
if ${libc_cv_asm_type_prefix+:} false; then :
@@ -4120,7 +4085,7 @@ else
for ac_try_prefix in '@' '%' '#'; do
cat > conftest.s <<EOF
${libc_cv_dot_text}
- ${libc_cv_asm_global_directive} foo
+ .globl foo
.type foo, ${ac_try_prefix}object
.size foo, 1
foo:
@@ -5731,7 +5696,7 @@ else
${libc_cv_dot_text}
foo:
.set glibc_conftest_frobozz,foo
-$libc_cv_asm_global_directive glibc_conftest_frobozz
+.globl glibc_conftest_frobozz
EOF
# The alpha-dec-osf1 assembler gives only a warning for `.set'
# (but it doesn't work), so we must do a linking check to be sure.
@@ -6739,7 +6704,7 @@ if ${libc_cv_asm_weak_directive+:} false; then :
else
cat > conftest.s <<EOF
${libc_cv_dot_text}
-${libc_cv_asm_global_directive} foo
+.globl foo
foo:
.weak foo
.weak bar; bar = foo
@@ -6767,11 +6732,11 @@ if ${libc_cv_asm_weakext_directive+:} false; then :
else
cat > conftest.s <<EOF
${libc_cv_dot_text}
-${libc_cv_asm_global_directive} foo
+.globl foo
foo:
.weakext bar foo
.weakext baz
-${libc_cv_asm_global_directive} baz
+.globl baz
baz:
EOF
if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
diff --git a/configure.in b/configure.in
index 5028e6411e..6b6dde5a83 100644
--- a/configure.in
+++ b/configure.in
@@ -581,34 +581,13 @@ else
AC_MSG_RESULT(yes)
fi
-AC_CACHE_CHECK(for assembler global-symbol directive,
- libc_cv_asm_global_directive, [dnl
-libc_cv_asm_global_directive=UNKNOWN
-for ac_globl in .globl .global .EXPORT; do
- cat > conftest.s <<EOF
- ${libc_cv_dot_text}
- ${ac_globl} foo
-foo:
-EOF
- if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
- libc_cv_asm_global_directive=${ac_globl}
- fi
- rm -f conftest*
- test $libc_cv_asm_global_directive != UNKNOWN && break
-done])
-if test $libc_cv_asm_global_directive = UNKNOWN; then
- AC_MSG_ERROR(cannot determine asm global directive)
-else
- AC_DEFINE_UNQUOTED(ASM_GLOBAL_DIRECTIVE, ${libc_cv_asm_global_directive})
-fi
-
AC_CACHE_CHECK(for assembler .type directive prefix,
libc_cv_asm_type_prefix, [dnl
libc_cv_asm_type_prefix=no
for ac_try_prefix in '@' '%' '#'; do
cat > conftest.s <<EOF
${libc_cv_dot_text}
- ${libc_cv_asm_global_directive} foo
+ .globl foo
.type foo, ${ac_try_prefix}object
.size foo, 1
foo:
@@ -1121,7 +1100,7 @@ cat > conftest.s <<EOF
${libc_cv_dot_text}
foo:
.set glibc_conftest_frobozz,foo
-$libc_cv_asm_global_directive glibc_conftest_frobozz
+.globl glibc_conftest_frobozz
EOF
# The alpha-dec-osf1 assembler gives only a warning for `.set'
# (but it doesn't work), so we must do a linking check to be sure.
@@ -1778,7 +1757,7 @@ AC_CACHE_CHECK(for assembler .weak directive, libc_cv_asm_weak_directive,
[dnl
cat > conftest.s <<EOF
${libc_cv_dot_text}
-${libc_cv_asm_global_directive} foo
+.globl foo
foo:
.weak foo
.weak bar; bar = foo
@@ -1796,11 +1775,11 @@ if test $libc_cv_asm_weak_directive = no; then
[dnl
cat > conftest.s <<EOF
${libc_cv_dot_text}
-${libc_cv_asm_global_directive} foo
+.globl foo
foo:
.weakext bar foo
.weakext baz
-${libc_cv_asm_global_directive} baz
+.globl baz
baz:
EOF
if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
diff --git a/elf/tst-unique1mod1.c b/elf/tst-unique1mod1.c
index 16de28d25e..ccc74fae3e 100644
--- a/elf/tst-unique1mod1.c
+++ b/elf/tst-unique1mod1.c
@@ -5,7 +5,7 @@
# define _S(s) #s
asm (".data;"
- S (ASM_GLOBAL_DIRECTIVE) " var\n"
+ ".globl var\n"
".type var, " S (ASM_TYPE_DIRECTIVE_PREFIX) "gnu_unique_object\n"
".size var, 4\n"
"var:.zero 4\n"
diff --git a/elf/tst-unique1mod2.c b/elf/tst-unique1mod2.c
index c075515827..4f1fec0087 100644
--- a/elf/tst-unique1mod2.c
+++ b/elf/tst-unique1mod2.c
@@ -5,7 +5,7 @@
# define _S(s) #s
asm (".data;"
- S (ASM_GLOBAL_DIRECTIVE) " var\n"
+ ".globl var\n"
".type var, " S (ASM_TYPE_DIRECTIVE_PREFIX) "gnu_unique_object\n"
".size var, 4\n"
"var:.zero 4\n"
diff --git a/elf/tst-unique2mod1.c b/elf/tst-unique2mod1.c
index 5e4ac4d68c..18b14db433 100644
--- a/elf/tst-unique2mod1.c
+++ b/elf/tst-unique2mod1.c
@@ -5,7 +5,7 @@
# define _S(s) #s
asm (".data;"
- S (ASM_GLOBAL_DIRECTIVE) " var\n"
+ ".globl var\n"
".type var, " S (ASM_TYPE_DIRECTIVE_PREFIX) "gnu_unique_object\n"
".size var, 4\n"
"var:.zero 4\n"
diff --git a/elf/tst-unique2mod2.c b/elf/tst-unique2mod2.c
index c075515827..4f1fec0087 100644
--- a/elf/tst-unique2mod2.c
+++ b/elf/tst-unique2mod2.c
@@ -5,7 +5,7 @@
# define _S(s) #s
asm (".data;"
- S (ASM_GLOBAL_DIRECTIVE) " var\n"
+ ".globl var\n"
".type var, " S (ASM_TYPE_DIRECTIVE_PREFIX) "gnu_unique_object\n"
".size var, 4\n"
"var:.zero 4\n"
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 12b3639647..da8730d2bc 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -27,7 +27,6 @@
It should define for us the following symbols:
* HAVE_ASM_SET_DIRECTIVE if we have `.set B, A' instead of `A = B'.
- * ASM_GLOBAL_DIRECTIVE with `.globl' or `.global'.
* ASM_TYPE_DIRECTIVE_PREFIX with `@' or `#' or whatever for .type,
or leave it undefined if there is no .type directive.
* HAVE_ASM_WEAK_DIRECTIVE if we have weak symbols using `.weak'.
@@ -117,32 +116,32 @@
# ifdef HAVE_ASM_SET_DIRECTIVE
# ifdef HAVE_ASM_GLOBAL_DOT_NAME
# define strong_alias(original, alias) \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ .globl C_SYMBOL_NAME (alias) ASM_LINE_SEP \
.set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original) ASM_LINE_SEP \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
+ .globl C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
.set C_SYMBOL_DOT_NAME (alias),C_SYMBOL_DOT_NAME (original)
# define strong_data_alias(original, alias) \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ .globl C_SYMBOL_NAME (alias) ASM_LINE_SEP \
.set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original)
# else
# define strong_alias(original, alias) \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ .globl C_SYMBOL_NAME (alias) ASM_LINE_SEP \
.set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original)
# define strong_data_alias(original, alias) strong_alias(original, alias)
# endif
# else
# ifdef HAVE_ASM_GLOBAL_DOT_NAME
# define strong_alias(original, alias) \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ .globl C_SYMBOL_NAME (alias) ASM_LINE_SEP \
C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
+ .globl C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
# define strong_data_alias(original, alias) \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ .globl C_SYMBOL_NAME (alias) ASM_LINE_SEP \
C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
# else
# define strong_alias(original, alias) \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ .globl C_SYMBOL_NAME (alias) ASM_LINE_SEP \
C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
# define strong_data_alias(original, alias) strong_alias(original, alias)
# endif
@@ -265,8 +264,7 @@ for linking")
# define declare_symbol_alias_1_paste_1(a,b) a##b
# else /* Not __ASSEMBLER__. */
# define declare_symbol_alias_1(symbol, original, type, size) \
- asm (declare_symbol_alias_1_stringify (ASM_GLOBAL_DIRECTIVE) \
- " " __SYMBOL_PREFIX #symbol \
+ asm (".globl " __SYMBOL_PREFIX #symbol \
"\n\t" declare_symbol_alias_1_alias (symbol, original) \
"\n\t.type " __SYMBOL_PREFIX #symbol ", " \
declare_symbol_alias_1_stringify (ASM_TYPE_DIRECTIVE_PREFIX) #type \
@@ -785,14 +783,12 @@ for linking")
#ifdef HAVE_ASM_SET_DIRECTIVE
# define libc_ifunc_hidden_def1(local, name) \
- __asm__ (declare_symbol_alias_1_stringify (ASM_GLOBAL_DIRECTIVE) \
- " " #local "\n\t" \
+ __asm__ (".globl " #local "\n\t" \
".hidden " #local "\n\t" \
".set " #local ", " #name);
#else
# define libc_ifunc_hidden_def1(local, name) \
- __asm__ (declare_symbol_alias_1_stringify (ASM_GLOBAL_DIRECTIVE) \
- " " #local "\n\t" \
+ __asm__ (".globl " #local "\n\t" \
".hidden " #local "\n\t" \
#local " = " #name);
#endif
diff --git a/locale/localeinfo.h b/locale/localeinfo.h
index 52f8121375..39c15989f2 100644
--- a/locale/localeinfo.h
+++ b/locale/localeinfo.h
@@ -255,11 +255,8 @@ extern __thread struct __locale_data *const *_nl_current_##category \
#define _NL_CURRENT_DEFINE(category) \
__thread struct __locale_data *const *_nl_current_##category \
attribute_hidden = &_nl_global_locale.__locales[category]; \
- asm (_NL_CURRENT_DEFINE_STRINGIFY (ASM_GLOBAL_DIRECTIVE) \
- " " __SYMBOL_PREFIX "_nl_current_" #category "_used\n" \
+ asm (".globl " __SYMBOL_PREFIX "_nl_current_" #category "_used\n" \
_NL_CURRENT_DEFINE_ABS (_nl_current_##category##_used, 1));
-#define _NL_CURRENT_DEFINE_STRINGIFY(x) _NL_CURRENT_DEFINE_STRINGIFY_1 (x)
-#define _NL_CURRENT_DEFINE_STRINGIFY_1(x) #x
#ifdef HAVE_ASM_SET_DIRECTIVE
# define _NL_CURRENT_DEFINE_ABS(sym, val) ".set " #sym ", " #val
#else
diff --git a/sysdeps/i386/configure b/sysdeps/i386/configure
index f56538f99a..a4eb0213bf 100644
--- a/sysdeps/i386/configure
+++ b/sysdeps/i386/configure
@@ -174,7 +174,7 @@ else
/* comment on
two lines */
${libc_cv_dot_text}
- ${libc_cv_asm_global_directive} foo
+ .globl foo
foo:
/* Unfortunately this test only works for a real instruction,
not for any of the machine-independent pseudo-ops.
diff --git a/sysdeps/i386/configure.in b/sysdeps/i386/configure.in
index b9e6f9eef4..6b78626f3c 100644
--- a/sysdeps/i386/configure.in
+++ b/sysdeps/i386/configure.in
@@ -13,7 +13,7 @@ cat > conftest.S <<EOF
/* comment on
two lines */
${libc_cv_dot_text}
- ${libc_cv_asm_global_directive} foo
+ .globl foo
foo:
/* Unfortunately this test only works for a real instruction,
not for any of the machine-independent pseudo-ops.
diff --git a/sysdeps/i386/i386-mcount.S b/sysdeps/i386/i386-mcount.S
index 66a3caa302..11f7493c3a 100644
--- a/sysdeps/i386/i386-mcount.S
+++ b/sysdeps/i386/i386-mcount.S
@@ -1,5 +1,5 @@
/* i386-specific implemetation of profiling support.
- Copyright (C) 1997, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -26,7 +26,7 @@
- the ELF `fixup' function uses GCC's regparm feature
- some (future) systems might want to pass parameters in registers. */