about summary refs log tree commit diff
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.gz
glibc-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.  */
 
-	ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(_mcount)
+	.globl C_SYMBOL_NAME(_mcount)
 	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(_mcount), @function)
 	.align ALIGNARG(4)
 C_LABEL(_mcount)
@@ -54,7 +54,7 @@ C_LABEL(_mcount)
 weak_alias (_mcount, mcount)
 
 	/* Same as above, but doesn't require a frame pointer */
-	ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(__fentry__)
+	.globl C_SYMBOL_NAME(__fentry__)
 	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__fentry__), @function)
 	.align ALIGNARG(4)
 C_LABEL(__fentry__)
diff --git a/sysdeps/i386/sysdep.h b/sysdeps/i386/sysdep.h
index b31caab0f7..01e6817919 100644
--- a/sysdeps/i386/sysdep.h
+++ b/sysdeps/i386/sysdep.h
@@ -63,7 +63,7 @@
 #define	ENTRY(name)							      \
   STABS_CURRENT_FILE1("")						      \
   STABS_CURRENT_FILE(name)						      \
-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name);				      \
+  .globl C_SYMBOL_NAME(name);				      \
   ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function)			      \
   .align ALIGNARG(4);							      \
   STABS_FUN(name)							      \
diff --git a/sysdeps/mach/sysdep.h b/sysdeps/mach/sysdep.h
index 3bcb9b32b3..29a2c8e90b 100644
--- a/sysdeps/mach/sysdep.h
+++ b/sysdeps/mach/sysdep.h
@@ -31,7 +31,7 @@
    work right.  */
 #undef ENTRY
 #define ENTRY(name) \
-  ASM_GLOBAL_DIRECTIVE name; \
+  .globl name; \
   .align ALIGN; \
   .type name,@function; \
   name:
diff --git a/sysdeps/powerpc/powerpc32/fpu/fprrest.S b/sysdeps/powerpc/powerpc32/fpu/fprrest.S
index 39bfc621dd..fe530f8bbc 100644
--- a/sysdeps/powerpc/powerpc32/fpu/fprrest.S
+++ b/sysdeps/powerpc/powerpc32/fpu/fprrest.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,68 +22,68 @@
 #include <sysdep.h>
 
 ENTRY(_restfpr_all)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf14)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_14)
+		.globl C_TEXT(_restf14)
+		.globl C_TEXT(_restfpr_14)
 C_TEXT(_restf14):
 C_TEXT(_restfpr_14):	lfd	fp14,-144(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf15)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_15)
+		.globl C_TEXT(_restf15)
+		.globl C_TEXT(_restfpr_15)
 C_TEXT(_restf15):
 C_TEXT(_restfpr_15):	lfd	fp15,-136(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf16)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_16)
+		.globl C_TEXT(_restf16)
+		.globl C_TEXT(_restfpr_16)
 C_TEXT(_restf16):
 C_TEXT(_restfpr_16):	lfd	fp16,-128(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf17)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_17)
+		.globl C_TEXT(_restf17)
+		.globl C_TEXT(_restfpr_17)
 C_TEXT(_restf17):
 C_TEXT(_restfpr_17):	lfd	fp17,-120(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf18)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_18)
+		.globl C_TEXT(_restf18)
+		.globl C_TEXT(_restfpr_18)
 C_TEXT(_restf18):
 C_TEXT(_restfpr_18):	lfd	fp18,-112(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf19)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_19)
+		.globl C_TEXT(_restf19)
+		.globl C_TEXT(_restfpr_19)
 C_TEXT(_restf19):
 C_TEXT(_restfpr_19):	lfd	fp19,-104(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf20)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_20)
+		.globl C_TEXT(_restf20)
+		.globl C_TEXT(_restfpr_20)
 C_TEXT(_restf20):
 C_TEXT(_restfpr_20):	lfd	fp20,-96(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf21)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_21)
+		.globl C_TEXT(_restf21)
+		.globl C_TEXT(_restfpr_21)
 C_TEXT(_restf21):
 C_TEXT(_restfpr_21):	lfd	fp21,-88(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf22)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_22)
+		.globl C_TEXT(_restf22)
+		.globl C_TEXT(_restfpr_22)
 C_TEXT(_restf22):
 C_TEXT(_restfpr_22):	lfd	fp22,-80(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf23)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_23)
+		.globl C_TEXT(_restf23)
+		.globl C_TEXT(_restfpr_23)
 C_TEXT(_restf23):
 C_TEXT(_restfpr_23):	lfd	fp23,-72(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf24)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_24)
+		.globl C_TEXT(_restf24)
+		.globl C_TEXT(_restfpr_24)
 C_TEXT(_restf24):
 C_TEXT(_restfpr_24):	lfd	fp24,-64(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf25)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_25)
+		.globl C_TEXT(_restf25)
+		.globl C_TEXT(_restfpr_25)
 C_TEXT(_restf25):
 C_TEXT(_restfpr_25):	lfd	fp25,-56(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf26)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_26)
+		.globl C_TEXT(_restf26)
+		.globl C_TEXT(_restfpr_26)
 C_TEXT(_restf26):
 C_TEXT(_restfpr_26):	lfd	fp26,-48(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf27)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_27)
+		.globl C_TEXT(_restf27)
+		.globl C_TEXT(_restfpr_27)
 C_TEXT(_restf27):
 C_TEXT(_restfpr_27):	lfd	fp27,-40(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf28)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_28)
+		.globl C_TEXT(_restf28)
+		.globl C_TEXT(_restfpr_28)
 C_TEXT(_restf28):
 C_TEXT(_restfpr_28):	lfd	fp28,-32(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf29)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_29)
+		.globl C_TEXT(_restf29)
+		.globl C_TEXT(_restfpr_29)
 C_TEXT(_restf29):
 C_TEXT(_restfpr_29):	lwz	r0,8(r1)	#get return address from frame
 			lfd	fp29,-24(r1)    #restore f29
diff --git a/sysdeps/powerpc/powerpc32/fpu/fprsave.S b/sysdeps/powerpc/powerpc32/fpu/fprsave.S
index fbeaa79525..25e472a8a6 100644
--- a/sysdeps/powerpc/powerpc32/fpu/fprsave.S
+++ b/sysdeps/powerpc/powerpc32/fpu/fprsave.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,83 +22,83 @@
 #include <sysdep.h>
 
 ENTRY(_savefpr_all)
-                ASM_GLOBAL_DIRECTIVE C_TEXT(_savef14)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_14)
+                .globl C_TEXT(_savef14)
+		.globl C_TEXT(_savefpr_14)
 C_TEXT(_savef14):
 C_TEXT(_savefpr_14):	stfd	fp14,-144(r1)
 			cfi_offset(fp14,-144)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef15)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_15)
+		.globl C_TEXT(_savef15)
+		.globl C_TEXT(_savefpr_15)
 C_TEXT(_savef15):
 C_TEXT(_savefpr_15):	stfd	fp15,-136(r1)
 			cfi_offset(fp15,-136)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef16)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_16)
+		.globl C_TEXT(_savef16)
+		.globl C_TEXT(_savefpr_16)
 C_TEXT(_savef16):
 C_TEXT(_savefpr_16):	stfd	fp16,-128(r1)
 			cfi_offset(fp16,-128)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef17)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_17)
+		.globl C_TEXT(_savef17)
+		.globl C_TEXT(_savefpr_17)
 C_TEXT(_savef17):
 C_TEXT(_savefpr_17):	stfd	fp17,-120(r1)
 			cfi_offset(fp17,-120)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef18)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_18)
+		.globl C_TEXT(_savef18)
+		.globl C_TEXT(_savefpr_18)
 C_TEXT(_savef18):
 C_TEXT(_savefpr_18):	stfd	fp18,-112(r1)
 			cfi_offset(fp18,-112)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef19)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_19)
+		.globl C_TEXT(_savef19)
+		.globl C_TEXT(_savefpr_19)
 C_TEXT(_savef19):
 C_TEXT(_savefpr_19):	stfd	fp19,-104(r1)
 			cfi_offset(fp19,-104)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef20)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_20)
+		.globl C_TEXT(_savef20)
+		.globl C_TEXT(_savefpr_20)
 C_TEXT(_savef20):
 C_TEXT(_savefpr_20):	stfd	fp20,-96(r1)
 			cfi_offset(fp20,-96)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef21)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_21)
+		.globl C_TEXT(_savef21)
+		.globl C_TEXT(_savefpr_21)
 C_TEXT(_savef21):
 C_TEXT(_savefpr_21):	stfd	fp21,-88(r1)
 			cfi_offset(fp21,-88)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef22)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_22)
+		.globl C_TEXT(_savef22)
+		.globl C_TEXT(_savefpr_22)
 C_TEXT(_savef22):
 C_TEXT(_savefpr_22):	stfd	fp22,-80(r1)
 			cfi_offset(fp22,-80)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef23)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_23)
+		.globl C_TEXT(_savef23)
+		.globl C_TEXT(_savefpr_23)
 C_TEXT(_savef23):
 C_TEXT(_savefpr_23):	stfd	fp23,-72(r1)
 			cfi_offset(fp23,-72)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef24)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_24)
+		.globl C_TEXT(_savef24)
+		.globl C_TEXT(_savefpr_24)
 C_TEXT(_savef24):
 C_TEXT(_savefpr_24):	stfd	fp24,-64(r1)
 			cfi_offset(fp24,-64)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef25)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_25)
+		.globl C_TEXT(_savef25)
+		.globl C_TEXT(_savefpr_25)
 C_TEXT(_savef25):
 C_TEXT(_savefpr_25):	stfd	fp25,-56(r1)
 			cfi_offset(fp25,-56)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef26)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_26)
+		.globl C_TEXT(_savef26)
+		.globl C_TEXT(_savefpr_26)
 C_TEXT(_savef26):
 C_TEXT(_savefpr_26):	stfd	fp26,-48(r1)
 			cfi_offset(fp26,-48)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef27)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_27)
+		.globl C_TEXT(_savef27)
+		.globl C_TEXT(_savefpr_27)
 C_TEXT(_savef27):
 C_TEXT(_savefpr_27):	stfd	fp27,-40(r1)
 			cfi_offset(fp27,-40)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef28)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_28)
+		.globl C_TEXT(_savef28)
+		.globl C_TEXT(_savefpr_28)
 C_TEXT(_savef28):
 C_TEXT(_savefpr_28):	stfd	fp28,-32(r1)
 			cfi_offset(fp28,-32)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef29)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_29)
+		.globl C_TEXT(_savef29)
+		.globl C_TEXT(_savefpr_29)
 C_TEXT(_savef29):
 C_TEXT(_savefpr_29):	stfd	fp29,-24(r1)	#save f29
 			stfd	fp30,-16(r1)	#save f30
diff --git a/sysdeps/powerpc/powerpc32/gprrest0.S b/sysdeps/powerpc/powerpc32/gprrest0.S
index 79150ef4d8..854e02ba02 100644
--- a/sysdeps/powerpc/powerpc32/gprrest0.S
+++ b/sysdeps/powerpc/powerpc32/gprrest0.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -27,39 +27,39 @@
 #include <sysdep.h>
 
 ENTRY(_restgpr0_all)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_13)
+		.globl C_TEXT(_restgpr0_13)
 C_TEXT(_restgpr0_13):	lwz	r13,-76(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_14)
+		.globl C_TEXT(_restgpr0_14)
 C_TEXT(_restgpr0_14):	lwz	r14,-72(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_15)
+		.globl C_TEXT(_restgpr0_15)
 C_TEXT(_restgpr0_15):	lwz	r15,-68(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_16)
+		.globl C_TEXT(_restgpr0_16)
 C_TEXT(_restgpr0_16):	lwz	r16,-64(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_17)
+		.globl C_TEXT(_restgpr0_17)
 C_TEXT(_restgpr0_17):	lwz	r17,-60(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_18)
+		.globl C_TEXT(_restgpr0_18)
 C_TEXT(_restgpr0_18):	lwz	r18,-56(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_19)
+		.globl C_TEXT(_restgpr0_19)
 C_TEXT(_restgpr0_19):	lwz	r19,-52(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_20)
+		.globl C_TEXT(_restgpr0_20)
 C_TEXT(_restgpr0_20):	lwz	r20,-48(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_21)
+		.globl C_TEXT(_restgpr0_21)
 C_TEXT(_restgpr0_21):	lwz	r21,-44(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_22)
+		.globl C_TEXT(_restgpr0_22)
 C_TEXT(_restgpr0_22):	lwz	r22,-40(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_23)
+		.globl C_TEXT(_restgpr0_23)
 C_TEXT(_restgpr0_23):	lwz	r23,-36(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_24)
+		.globl C_TEXT(_restgpr0_24)
 C_TEXT(_restgpr0_24):	lwz	r24,-32(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_25)
+		.globl C_TEXT(_restgpr0_25)
 C_TEXT(_restgpr0_25):	lwz	r25,-28(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_26)
+		.globl C_TEXT(_restgpr0_26)
 C_TEXT(_restgpr0_26):	lwz	r26,-24(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_27)
+		.globl C_TEXT(_restgpr0_27)
 C_TEXT(_restgpr0_27):	lwz	r27,-20(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_28)
+		.globl C_TEXT(_restgpr0_28)
 C_TEXT(_restgpr0_28):	lwz	r28,-16(r1)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_29)
+		.globl C_TEXT(_restgpr0_29)
 C_TEXT(_restgpr0_29):	lwz	r0,8(r1)	#get return address from frame
 			lwz	r29,-12(r1)	#restore r29
 			mtlr	r0		#move return address to LR
diff --git a/sysdeps/powerpc/powerpc32/gprrest1.S b/sysdeps/powerpc/powerpc32/gprrest1.S
index 945b935ba5..0c20cf8848 100644
--- a/sysdeps/powerpc/powerpc32/gprrest1.S
+++ b/sysdeps/powerpc/powerpc32/gprrest1.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -23,39 +23,39 @@
 #include <sysdep.h>
 
 ENTRY(_restgpr1_all)
-		ASM_GLOBAL_DIRECTIVE	C_TEXT(_restgpr1_13)
+		.globl	C_TEXT(_restgpr1_13)
 C_TEXT(_restgpr1_13):	lwz	r13,-76(r12)
-		ASM_GLOBAL_DIRECTIVE	C_TEXT(_restgpr1_14)
+		.globl	C_TEXT(_restgpr1_14)
 C_TEXT(_restgpr1_14):	lwz	r14,-72(r12)
-		ASM_GLOBAL_DIRECTIVE	C_TEXT(_restgpr1_15)
+		.globl	C_TEXT(_restgpr1_15)
 C_TEXT(_restgpr1_15):	lwz	r15,-68(r12)
-		ASM_GLOBAL_DIRECTIVE	C_TEXT(_restgpr1_16)
+		.globl	C_TEXT(_restgpr1_16)
 C_TEXT(_restgpr1_16):	lwz	r16,-64(r12)
-		ASM_GLOBAL_DIRECTIVE	C_TEXT(_restgpr1_17)
+		.globl	C_TEXT(_restgpr1_17)
 C_TEXT(_restgpr1_17):	lwz	r17,-60(r12)
-		ASM_GLOBAL_DIRECTIVE	C_TEXT(_restgpr1_18)
+		.globl	C_TEXT(_restgpr1_18)
 C_TEXT(_restgpr1_18):	lwz	r18,-56(r12)
-		ASM_GLOBAL_DIRECTIVE	C_TEXT(_restgpr1_19)
+		.globl	C_TEXT(_restgpr1_19)
 C_TEXT(_restgpr1_19):	lwz	r19,-52(r12)
-		ASM_GLOBAL_DIRECTIVE	C_TEXT(_restgpr1_20)
+		.globl	C_TEXT(_restgpr1_20)
 C_TEXT(_restgpr1_20):	lwz	r20,-48(r12)
-		ASM_GLOBAL_DIRECTIVE	C_TEXT(_restgpr1_21)
+		.globl	C_TEXT(_restgpr1_21)
 C_TEXT(_restgpr1_21):	lwz	r21,-44(r12)
-		ASM_GLOBAL_DIRECTIVE	C_TEXT(_restgpr1_22)
+		.globl	C_TEXT(_restgpr1_22)
 C_TEXT(_restgpr1_22):	lwz	r22,-40(r12)
-		ASM_GLOBAL_DIRECTIVE	C_TEXT(_restgpr1_23)
+		.globl	C_TEXT(_restgpr1_23)
 C_TEXT(_restgpr1_23):	lwz	r23,-36(r12)
-		ASM_GLOBAL_DIRECTIVE	C_TEXT(_restgpr1_24)
+		.globl	C_TEXT(_restgpr1_24)
 C_TEXT(_restgpr1_24):	lwz	r24,-32(r12)
-		ASM_GLOBAL_DIRECTIVE	C_TEXT(_restgpr1_25)
+		.globl	C_TEXT(_restgpr1_25)
 C_TEXT(_restgpr1_25):	lwz	r25,-28(r12)
-		ASM_GLOBAL_DIRECTIVE	C_TEXT(_restgpr1_26)
+		.globl	C_TEXT(_restgpr1_26)
 C_TEXT(_restgpr1_26):	lwz	r26,-24(r12)
-		ASM_GLOBAL_DIRECTIVE	C_TEXT(_restgpr1_27)
+		.globl	C_TEXT(_restgpr1_27)
 C_TEXT(_restgpr1_27):	lwz	r27,-20(r12)
-		ASM_GLOBAL_DIRECTIVE	C_TEXT(_restgpr1_28)
+		.globl	C_TEXT(_restgpr1_28)
 C_TEXT(_restgpr1_28):	lwz	r28,-16(r12)
-		ASM_GLOBAL_DIRECTIVE	C_TEXT(_restgpr1_29)
+		.globl	C_TEXT(_restgpr1_29)
 C_TEXT(_restgpr1_29):	lwz	r29,-12(r12)	#restore r29
 			lwz	r30,-8(r12)	#restore r30
 			lwz	r31,-4(r12)	#restore r31
diff --git a/sysdeps/powerpc/powerpc32/gprsave0.S b/sysdeps/powerpc/powerpc32/gprsave0.S
index 977653e446..25b1e28582 100644
--- a/sysdeps/powerpc/powerpc32/gprsave0.S
+++ b/sysdeps/powerpc/powerpc32/gprsave0.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -27,55 +27,55 @@
 #include <sysdep.h>
 
 ENTRY(_savegpr0_all)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_13)
+		.globl C_TEXT(_savegpr0_13)
 C_TEXT(_savegpr0_13):	stw	r13,-76(r1)
 			cfi_offset(r13,-76)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_14)
+		.globl C_TEXT(_savegpr0_14)
 C_TEXT(_savegpr0_14):	stw	r14,-72(r1)
 			cfi_offset(r14,-72)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_15)
+		.globl C_TEXT(_savegpr0_15)
 C_TEXT(_savegpr0_15):	stw	r15,-68(r1)
 			cfi_offset(r15,-68)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_16)
+		.globl C_TEXT(_savegpr0_16)
 C_TEXT(_savegpr0_16):	stw	r16,-64(r1)
 			cfi_offset(r16,-64)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_17)
+		.globl C_TEXT(_savegpr0_17)
 C_TEXT(_savegpr0_17):	stw	r17,-60(r1)
 			cfi_offset(r17,-60)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_18)
+		.globl C_TEXT(_savegpr0_18)
 C_TEXT(_savegpr0_18):	stw	r18,-56(r1)
 			cfi_offset(r18,-56)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_19)
+		.globl C_TEXT(_savegpr0_19)
 C_TEXT(_savegpr0_19):	stw	r19,-52(r1)
 			cfi_offset(r19,-52)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_20)
+		.globl C_TEXT(_savegpr0_20)
 C_TEXT(_savegpr0_20):	stw	r20,-48(r1)
 			cfi_offset(r20,-48)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_21)
+		.globl C_TEXT(_savegpr0_21)
 C_TEXT(_savegpr0_21):	stw	r21,-44(r1)
 			cfi_offset(r21,-44)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_22)
+		.globl C_TEXT(_savegpr0_22)
 C_TEXT(_savegpr0_22):	stw	r22,-40(r1)
 			cfi_offset(r22,-40)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_23)
+		.globl C_TEXT(_savegpr0_23)
 C_TEXT(_savegpr0_23):	stw	r23,-36(r1)
 			cfi_offset(r23,-36)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_24)
+		.globl C_TEXT(_savegpr0_24)
 C_TEXT(_savegpr0_24):	stw	r24,-32(r1)
 			cfi_offset(r24,-32)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_25)
+		.globl C_TEXT(_savegpr0_25)
 C_TEXT(_savegpr0_25):	stw	r25,-28(r1)
 			cfi_offset(r25,-28)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_26)
+		.globl C_TEXT(_savegpr0_26)
 C_TEXT(_savegpr0_26):	stw	r26,-24(r1)
 			cfi_offset(r26,-24)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_27)
+		.globl C_TEXT(_savegpr0_27)
 C_TEXT(_savegpr0_27):	stw	r27,-20(r1)
 			cfi_offset(r27,-20)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_28)
+		.globl C_TEXT(_savegpr0_28)
 C_TEXT(_savegpr0_28):	stw	r28,-16(r1)
 			cfi_offset(r28,-16)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr0_29)
+		.globl C_TEXT(_savegpr0_29)
 C_TEXT(_savegpr0_29):	stw	r29,-12(r1) #save r29
 			stw	r30,-8(r1)  #save r30
 			stw	r31,-4(r1)  #save r31
diff --git a/sysdeps/powerpc/powerpc32/gprsave1.S b/sysdeps/powerpc/powerpc32/gprsave1.S
index a15d785d09..eb1cf3755a 100644
--- a/sysdeps/powerpc/powerpc32/gprsave1.S
+++ b/sysdeps/powerpc/powerpc32/gprsave1.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -23,39 +23,39 @@
 #include <sysdep.h>
 
 ENTRY(_savegpr1_all)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_13)
+		.globl C_TEXT(_savegpr1_13)
 C_TEXT(_savegpr1_13):	stw	r13,-76(r12)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_14)
+		.globl C_TEXT(_savegpr1_14)
 C_TEXT(_savegpr1_14):	stw	r14,-72(r12)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_15)
+		.globl C_TEXT(_savegpr1_15)
 C_TEXT(_savegpr1_15):	stw	r15,-68(r12)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_16)
+		.globl C_TEXT(_savegpr1_16)
 C_TEXT(_savegpr1_16):	stw	r16,-64(r12)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_17)
+		.globl C_TEXT(_savegpr1_17)
 C_TEXT(_savegpr1_17):	stw	r17,-60(r12)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_18)
+		.globl C_TEXT(_savegpr1_18)
 C_TEXT(_savegpr1_18):	stw	r18,-56(r12)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_19)
+		.globl C_TEXT(_savegpr1_19)
 C_TEXT(_savegpr1_19):	stw	r19,-52(r12)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_20)
+		.globl C_TEXT(_savegpr1_20)
 C_TEXT(_savegpr1_20):	stw	r20,-48(r12)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_21)
+		.globl C_TEXT(_savegpr1_21)
 C_TEXT(_savegpr1_21):	stw	r21,-44(r12)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_22)
+		.globl C_TEXT(_savegpr1_22)
 C_TEXT(_savegpr1_22):	stw	r22,-40(r12)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_23)
+		.globl C_TEXT(_savegpr1_23)
 C_TEXT(_savegpr1_23):	stw	r23,-36(r12)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_24)
+		.globl C_TEXT(_savegpr1_24)
 C_TEXT(_savegpr1_24):	stw	r24,-32(r12)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_25)
+		.globl C_TEXT(_savegpr1_25)
 C_TEXT(_savegpr1_25):	stw	r25,-28(r12)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_26)
+		.globl C_TEXT(_savegpr1_26)
 C_TEXT(_savegpr1_26):	stw	r26,-24(r12)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_27)
+		.globl C_TEXT(_savegpr1_27)
 C_TEXT(_savegpr1_27):	stw	r27,-20(r12)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_28)
+		.globl C_TEXT(_savegpr1_28)
 C_TEXT(_savegpr1_28):	stw	r28,-16(r12)
-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_29)
+		.globl C_TEXT(_savegpr1_29)
 C_TEXT(_savegpr1_29):	stw	r29,-12(r12)	#save r29
 			stw	r30,-8(r12)	#save r30
 			stw	r31,-4(r12)	#save r31
diff --git a/sysdeps/powerpc/powerpc32/sysdep.h b/sysdeps/powerpc/powerpc32/sysdep.h
index 621022effd..811ebf2aed 100644
--- a/sysdeps/powerpc/powerpc32/sysdep.h
+++ b/sysdeps/powerpc/powerpc32/sysdep.h
@@ -37,7 +37,7 @@
 #endif /* PROF */
 
 #define	ENTRY(name)							      \
-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name);				      \
+  .globl C_SYMBOL_NAME(name);				      \
   ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function)			      \
   .align ALIGNARG(2);							      \
   C_LABEL(name)								      \
@@ -64,7 +64,7 @@ GOT_LABEL:			;					      \
    past a 2^align boundary.  */
 #ifdef PROF
 # define EALIGN(name, alignt, words)					      \
-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name);				      \
+  .globl C_SYMBOL_NAME(name);				      \
   ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function)			      \
   .align ALIGNARG(2);							      \
   C_LABEL(name)								      \
@@ -76,7 +76,7 @@ GOT_LABEL:			;					      \
   0:
 #else /* PROF */
 # define EALIGN(name, alignt, words)					      \
-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name);				      \
+  .globl C_SYMBOL_NAME(name);				      \
   ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function)			      \
   .align ALIGNARG(alignt);						      \
   EALIGN_W_##words;							      \
diff --git a/sysdeps/s390/s390-32/s390-mcount.S b/sysdeps/s390/s390-32/s390-mcount.S
index 6e09c79a65..1c8c79adac 100644
--- a/sysdeps/s390/s390-32/s390-mcount.S
+++ b/sysdeps/s390/s390-32/s390-mcount.S
@@ -1,5 +1,5 @@
 /* S/390-specific implemetation of profiling support.
-   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 2000-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com)
 
@@ -47,7 +47,7 @@
  * _mcount may not modify any register.
  */
 
-	ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(_mcount)
+	.globl C_SYMBOL_NAME(_mcount)
 	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(_mcount), @function)
 	cfi_startproc
 	.align ALIGNARG(4)
diff --git a/sysdeps/s390/s390-32/sysdep.h b/sysdeps/s390/s390-32/sysdep.h
index 43da126ac9..24a07a2a90 100644
--- a/sysdeps/s390/s390-32/sysdep.h
+++ b/sysdeps/s390/s390-32/sysdep.h
@@ -32,7 +32,7 @@
 
 /* Define an entry point visible from C. */
 #define	ENTRY(name)							      \
-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name);				      \
+  .globl C_SYMBOL_NAME(name);				      \
   ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function)			      \
   .align ALIGNARG(2);							      \
   C_LABEL(name)								      \
diff --git a/sysdeps/s390/s390-64/s390x-mcount.S b/sysdeps/s390/s390-64/s390x-mcount.S
index 95fa848d16..5d8ef91178 100644
--- a/sysdeps/s390/s390-64/s390x-mcount.S
+++ b/sysdeps/s390/s390-64/s390x-mcount.S
@@ -1,5 +1,5 @@
 /* 64 bit S/390-specific implemetation of profiling support.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2012 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com)
    This file is part of the GNU C Library.
 
@@ -43,7 +43,7 @@
    parameter. &.LP0 was loaded to %r1 and the return address is in %r14.
    _mcount may not modify any register.  */
 
-	ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(_mcount)
+	.globl C_SYMBOL_NAME(_mcount)
 	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(_mcount), @function)
 	cfi_startproc
 	.align ALIGNARG(4)
diff --git a/sysdeps/s390/s390-64/sysdep.h b/sysdeps/s390/s390-64/sysdep.h
index d5465b37e2..b7449b6b15 100644
--- a/sysdeps/s390/s390-64/sysdep.h
+++ b/sysdeps/s390/s390-64/sysdep.h
@@ -32,7 +32,7 @@
 
 /* Define an entry point visible from C. */
 #define	ENTRY(name)							      \
-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name);				      \
+  .globl C_SYMBOL_NAME(name);				      \
   ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function)			      \
   .align ALIGNARG(2);							      \
   C_LABEL(name)								      \
diff --git a/sysdeps/sh/_mcount.S b/sysdeps/sh/_mcount.S
index 7e3d50e94e..878788b599 100644
--- a/sysdeps/sh/_mcount.S
+++ b/sysdeps/sh/_mcount.S
@@ -19,7 +19,7 @@
 
 #include <sysdep.h>
 
-	ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(_mcount)
+	.globl C_SYMBOL_NAME(_mcount)
 	ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(_mcount),function)
 	cfi_startproc
 	.align	5
diff --git a/sysdeps/sh/sysdep.h b/sysdeps/sh/sysdep.h
index 9354d27118..66a1982887 100644
--- a/sysdeps/sh/sysdep.h
+++ b/sysdeps/sh/sysdep.h
@@ -36,7 +36,7 @@
 
 /* Define an entry point visible from C.  */
 #define	ENTRY(name)							      \
-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name);				      \
+  .globl C_SYMBOL_NAME(name);				      \
   ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),function)			      \
   .align ALIGNARG(5);							      \
   C_LABEL(name)								      \
diff --git a/sysdeps/x86_64/_mcount.S b/sysdeps/x86_64/_mcount.S
index 6904731ba5..c919865b4d 100644
--- a/sysdeps/x86_64/_mcount.S
+++ b/sysdeps/x86_64/_mcount.S
@@ -1,5 +1,5 @@
 /* Machine-specific calling sequence for `mcount' profiling function.  x86-64 version.
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002-2012 Free Software Foundation, Inc.
    Contributed by Andreas Jaeger <aj@suse.de>.
    This file is part of the GNU C Library.
 
@@ -24,7 +24,7 @@
 
 #include <sysdep.h>
 
-	ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(_mcount)
+	.globl C_SYMBOL_NAME(_mcount)
 	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(_mcount), @function)
 	.align ALIGNARG(4)
 C_LABEL(_mcount)
@@ -65,7 +65,7 @@ C_LABEL(_mcount)
 #undef mcount
 weak_alias (_mcount, mcount)
 
-	ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(__fentry__)
+	.globl C_SYMBOL_NAME(__fentry__)
 	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__fentry__), @function)
 	.align ALIGNARG(4)
 C_LABEL(__fentry__)
diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index d737107566..5c17aba08d 100644
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/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/x86_64/configure.in b/sysdeps/x86_64/configure.in
index e3bf103fd1..221d93d467 100644
--- a/sysdeps/x86_64/configure.in
+++ b/sysdeps/x86_64/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/x86_64/sysdep.h b/sysdeps/x86_64/sysdep.h
index af69499759..258781d096 100644
--- a/sysdeps/x86_64/sysdep.h
+++ b/sysdeps/x86_64/sysdep.h
@@ -34,7 +34,7 @@
 
 /* Define an entry point visible from C.  */
 #define	ENTRY(name)							      \
-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name);				      \
+  .globl C_SYMBOL_NAME(name);				      \
   ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function)			      \
   .align ALIGNARG(4);							      \
   C_LABEL(name)								      \