summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-03-05 10:29:47 +0000
committerUlrich Drepper <drepper@redhat.com>2004-03-05 10:29:47 +0000
commitafdca0f2a3a18fb0dcfc334c205e0fb96e90e839 (patch)
tree59ba9a29d6174ebbbbe09258ea52e9f956e33c2e
parent20c37dfde1a836a139f6269e8617260f2b90bf52 (diff)
downloadglibc-afdca0f2a3a18fb0dcfc334c205e0fb96e90e839.tar.gz
glibc-afdca0f2a3a18fb0dcfc334c205e0fb96e90e839.tar.xz
glibc-afdca0f2a3a18fb0dcfc334c205e0fb96e90e839.zip
Update.
	* sysdeps/sparc/sparc64/dl-machine.h: Likewise.
	* sysdeps/sparc/sparc32/dl-machine.h: Likewise.
	* sysdeps/s390/s390-64/dl-machine.h: Likewise.
	* sysdeps/s390/s390-32/dl-machine.h: Likewise.
	* sysdeps/powerpc/powerpc64/dl-machine.h: Likewise.
	* sysdeps/powerpc/powerpc32/dl-machine.c: Likewise.
	* sysdeps/m68k/dl-machine.h: Likewise.
	* sysdeps/ia64/dl-machine.h: Likewise.
	* sysdeps/arm/dl-machine.h: Likewise.
	* sysdeps/alpha/dl-machine.h: Likewise.
-rw-r--r--ChangeLog10
-rw-r--r--elf/dl-close.c4
-rw-r--r--elf/dl-conflict.c4
-rw-r--r--elf/dl-deps.c10
-rw-r--r--elf/dl-dst.h4
-rw-r--r--elf/dl-error.c4
-rw-r--r--elf/dl-fini.c4
-rw-r--r--elf/dl-init.c6
-rw-r--r--elf/dl-load.c49
-rw-r--r--elf/dl-lookup.c24
-rw-r--r--elf/dl-minimal.c8
-rw-r--r--elf/dl-open.c11
-rw-r--r--elf/dl-profile.c24
-rw-r--r--elf/dl-reloc.c15
-rw-r--r--elf/dl-runtime.c4
-rw-r--r--elf/dl-support.c6
-rw-r--r--elf/dl-version.c4
-rw-r--r--elf/do-lookup.h6
-rw-r--r--elf/rtld.c110
-rw-r--r--nptl/sysdeps/i386/tls.h4
-rw-r--r--sysdeps/alpha/dl-machine.h4
-rw-r--r--sysdeps/arm/dl-machine.h12
-rw-r--r--sysdeps/generic/dl-cache.c19
-rw-r--r--sysdeps/generic/dl-origin.c8
-rw-r--r--sysdeps/generic/dl-sysdep.c31
-rw-r--r--sysdeps/generic/libc-start.c4
-rw-r--r--sysdeps/i386/dl-machine.h12
-rw-r--r--sysdeps/i386/fpu/fclrexcpt.c2
-rw-r--r--sysdeps/i386/fpu/fedisblxcpt.c4
-rw-r--r--sysdeps/i386/fpu/feenablxcpt.c4
-rw-r--r--sysdeps/i386/fpu/feholdexcpt.c4
-rw-r--r--sysdeps/i386/fpu/fesetround.c4
-rw-r--r--sysdeps/i386/fpu/fsetexcptflg.c6
-rw-r--r--sysdeps/i386/fpu/ftestexcept.c4
-rw-r--r--sysdeps/i386/setfpucw.c4
-rw-r--r--sysdeps/ia64/dl-machine.h2
-rw-r--r--sysdeps/m68k/dl-machine.h6
-rw-r--r--sysdeps/powerpc/powerpc32/dl-machine.c10
-rw-r--r--sysdeps/powerpc/powerpc64/dl-machine.h7
-rw-r--r--sysdeps/s390/s390-32/dl-machine.h10
-rw-r--r--sysdeps/s390/s390-64/dl-machine.h10
-rw-r--r--sysdeps/sparc/sparc32/dl-machine.h16
-rw-r--r--sysdeps/sparc/sparc64/dl-machine.h4
-rw-r--r--sysdeps/unix/sysv/linux/dl-execstack.c17
-rw-r--r--sysdeps/unix/sysv/linux/dl-librecon.h4
-rw-r--r--sysdeps/unix/sysv/linux/dl-origin.c8
-rw-r--r--sysdeps/unix/sysv/linux/dl-osinfo.h4
-rw-r--r--sysdeps/unix/sysv/linux/getclktck.c4
-rw-r--r--sysdeps/unix/sysv/linux/getpagesize.c7
-rw-r--r--sysdeps/unix/sysv/linux/i386/dl-librecon.h4
-rw-r--r--sysdeps/unix/sysv/linux/i386/sigaction.c4
-rw-r--r--sysdeps/unix/sysv/linux/init-first.c4
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S50
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S96
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S127
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S334
-rw-r--r--sysdeps/unix/sysv/linux/prof-freq.c8
-rw-r--r--sysdeps/x86_64/dl-machine.h8
58 files changed, 605 insertions, 572 deletions
diff --git a/ChangeLog b/ChangeLog
index c9e6230bb7..e69494ea08 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -52,6 +52,16 @@
 	* sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Likewise.
 	* sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Likewise.
 	* sysdeps/x86_64/dl-machine.h: Likewise.
+	* sysdeps/sparc/sparc64/dl-machine.h: Likewise.
+	* sysdeps/sparc/sparc32/dl-machine.h: Likewise.
+	* sysdeps/s390/s390-64/dl-machine.h: Likewise.
+	* sysdeps/s390/s390-32/dl-machine.h: Likewise.
+	* sysdeps/powerpc/powerpc64/dl-machine.h: Likewise.
+	* sysdeps/powerpc/powerpc32/dl-machine.c: Likewise.
+	* sysdeps/m68k/dl-machine.h: Likewise.
+	* sysdeps/ia64/dl-machine.h: Likewise.
+	* sysdeps/arm/dl-machine.h: Likewise.
+	* sysdeps/alpha/dl-machine.h: Likewise.
 
 2004-03-04  Ulrich Drepper  <drepper@redhat.com>
 
diff --git a/elf/dl-close.c b/elf/dl-close.c
index c7424c5ffb..c63dabbfe1 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -134,7 +134,7 @@ _dl_close (void *_map)
   if (map->l_opencount > 1 || map->l_type != lt_loaded)
     {
       /* There are still references to this object.  Do nothing more.  */
-      if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_FILES, 0))
+      if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
 	_dl_debug_printf ("\nclosing file=%s; opencount == %u\n",
 			  map->l_name, map->l_opencount);
 
@@ -224,7 +224,7 @@ _dl_close (void *_map)
 	  && (imap->l_flags_1 & DF_1_NODELETE) == 0)
 	{
 	  /* When debugging print a message first.  */
-	  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
+	  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
 	    _dl_debug_printf ("\ncalling fini: %s\n\n", imap->l_name);
 
 	  /* Call its termination function.  Do not do it for
diff --git a/elf/dl-conflict.c b/elf/dl-conflict.c
index 0068cd885a..8546d365c9 100644
--- a/elf/dl-conflict.c
+++ b/elf/dl-conflict.c
@@ -1,5 +1,5 @@
 /* Resolve conflicts against already prelinked libraries.
-   Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2001.
 
@@ -33,7 +33,7 @@ _dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict,
 		       ElfW(Rela) *conflictend)
 {
 #if ! ELF_MACHINE_NO_RELA
-  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_RELOC, 0))
+  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_RELOC, 0))
     _dl_printf ("\nconflict processing: %s\n",
 		l->l_name[0] ? l->l_name : rtld_progname);
 
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index 0a9183faee..b2e6ec612b 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -1,5 +1,5 @@
 /* Load the dependencies of a mapped object.
-   Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1996-2003, 2004 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
@@ -126,7 +126,7 @@ empty dynamics string token substitution"));				      \
 	    else							      \
 	      {								      \
 		/* This is for DT_AUXILIARY.  */			      \
-		if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_LIBS, 0))  \
+		if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS, 0))\
 		  INTUSE(_dl_debug_printf) (N_("\
 cannot load auxiliary `%s' because of empty dynamic string token "	      \
 					    "substitution\n"), __str);	      \
@@ -291,7 +291,7 @@ _dl_map_object_deps (struct link_map *map,
 		    int err;
 
 		    /* Say that we are about to load an auxiliary library.  */
-		    if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_LIBS,
+		    if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS,
 					  0))
 		      INTUSE(_dl_debug_printf) ("load auxiliary object=%s"
 						" requested by file=%s\n",
@@ -319,7 +319,7 @@ _dl_map_object_deps (struct link_map *map,
 		    int err;
 
 		    /* Say that we are about to load an auxiliary library.  */
-		    if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_LIBS,
+		    if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS,
 					  0))
 		      INTUSE(_dl_debug_printf) ("load filtered object=%s"
 						" requested by file=%s\n",
@@ -510,7 +510,7 @@ _dl_map_object_deps (struct link_map *map,
       runp->map->l_reserved = 0;
     }
 
-  if (__builtin_expect(GL(dl_debug_mask) & DL_DEBUG_PRELINK, 0) != 0
+  if (__builtin_expect(GLRO(dl_debug_mask) & DL_DEBUG_PRELINK, 0) != 0
       && map == GL(dl_loaded))
     {
       /* If we are to compute conflicts, we have to build local scope
diff --git a/elf/dl-dst.h b/elf/dl-dst.h
index 4f0669d92b..b50d6735e3 100644
--- a/elf/dl-dst.h
+++ b/elf/dl-dst.h
@@ -1,5 +1,5 @@
 /* Handling of dynamic sring tokens.
-   Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2002, 2003, 2004 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
@@ -62,7 +62,7 @@ extern size_t _dl_dst_count_internal (const char *name, int is_path);
 	  origin_len = (l)->l_origin == (char *) -1			      \
 	    ? 0 : strlen ((l)->l_origin);				      \
 									      \
-	__len += __cnt * (MAX (origin_len, GL(dl_platformlen)) - 7);	      \
+	__len += __cnt * (MAX (origin_len, GLRO(dl_platformlen)) - 7);	      \
       }									      \
 									      \
     __len; })
diff --git a/elf/dl-error.c b/elf/dl-error.c
index df91088843..f234026701 100644
--- a/elf/dl-error.c
+++ b/elf/dl-error.c
@@ -1,5 +1,5 @@
 /* Error handling for runtime dynamic linker.
-   Copyright (C) 1995,96,97,98,99,2000,2001,2002 Free Software Foundation, Inc.
+   Copyright (C) 1995-2002,2004 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
@@ -121,7 +121,7 @@ internal_function
 _dl_signal_cerror (int errcode, const char *objname, const char *occation,
 		   const char *errstring)
 {
-  if (__builtin_expect (GL(dl_debug_mask)
+  if (__builtin_expect (GLRO(dl_debug_mask)
 			& ~(DL_DEBUG_STATISTICS|DL_DEBUG_PRELINK), 0))
     INTUSE(_dl_debug_printf) ("%s: error: %s: %s (%s)\n", objname, occation,
 			      errstring, receiver ? "continued" : "fatal");
diff --git a/elf/dl-fini.c b/elf/dl-fini.c
index 7115efb85a..3dc1db16c9 100644
--- a/elf/dl-fini.c
+++ b/elf/dl-fini.c
@@ -146,7 +146,7 @@ _dl_fini (void)
 	    continue;
 
 	  /* When debugging print a message first.  */
-	  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
+	  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
 	    INTUSE(_dl_debug_printf) ("\ncalling fini: %s\n\n",
 				      l->l_name[0]
 				      ? l->l_name : rtld_progname);
@@ -174,7 +174,7 @@ _dl_fini (void)
 
   __rtld_lock_unlock_recursive (GL(dl_load_lock));
 
-  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_STATISTICS, 0))
+  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_STATISTICS, 0))
     {
       INTUSE(_dl_debug_printf) ("\nruntime linker statistics:\n");
       INTUSE(_dl_debug_printf) ("\
diff --git a/elf/dl-init.c b/elf/dl-init.c
index 0fb9328ef9..37d5045d03 100644
--- a/elf/dl-init.c
+++ b/elf/dl-init.c
@@ -1,5 +1,5 @@
 /* Return the next shared object initializer function not yet run.
-   Copyright (C) 1995, 1996, 1998-2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1998-2002, 2004 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
@@ -51,7 +51,7 @@ call_init (struct link_map *l, int argc, char **argv, char **env)
     return;
 
   /* Print a debug message if wanted.  */
-  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
+  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
     INTUSE(_dl_debug_printf) ("\ncalling init: %s\n\n",
 			      l->l_name[0] ? l->l_name : rtld_progname);
 
@@ -108,7 +108,7 @@ _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
       ElfW(Addr) *addrs;
       unsigned int cnt;
 
-      if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
+      if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
 	INTUSE(_dl_debug_printf) ("\ncalling preinit: %s\n\n",
 				  main_map->l_name[0]
 				  ? main_map->l_name : rtld_progname);
diff --git a/elf/dl-load.c b/elf/dl-load.c
index cba75f62fa..f7449bce9c 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -248,7 +248,7 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
 			     INTUSE(__libc_enable_secure))) != 0)
 	    repl = l->l_origin;
 	  else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0)
-	    repl = GL(dl_platform);
+	    repl = GLRO(dl_platform);
 	  else if ((len = is_dst (start, name, "LIB", is_path, 0)) != 0)
 	    repl = DL_DST_LIB;
 
@@ -502,10 +502,10 @@ decompose_rpath (struct r_search_path_struct *sps,
 
   /* First see whether we must forget the RUNPATH and RPATH from this
      object.  */
-  if (__builtin_expect (GL(dl_inhibit_rpath) != NULL, 0)
+  if (__builtin_expect (GLRO(dl_inhibit_rpath) != NULL, 0)
       && !INTUSE(__libc_enable_secure))
     {
-      const char *inhp = GL(dl_inhibit_rpath);
+      const char *inhp = GLRO(dl_inhibit_rpath);
 
       do
 	{
@@ -623,7 +623,7 @@ _dl_init_paths (const char *llp)
      directories addressed by the LD_LIBRARY_PATH environment variable.  */
 
   /* Get the capabilities.  */
-  capstr = _dl_important_hwcaps (GL(dl_platform), GL(dl_platformlen),
+  capstr = _dl_important_hwcaps (GLRO(dl_platform), GLRO(dl_platformlen),
 				 &ncapstr, &max_capstrlen);
 
   /* First set up the rest of the default search directory entries.  */
@@ -844,7 +844,7 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
     return NULL;
 
   /* Print debugging message.  */
-  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_FILES, 0))
+  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
     INTUSE(_dl_debug_printf) ("file=%s;  generating link map\n", name);
 
   /* This is the ELF header.  We read it in `open_verify'.  */
@@ -928,7 +928,7 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
 	case PT_LOAD:
 	  /* A load command tells us to map in part of the file.
 	     We record the load commands and process them all later.  */
-	  if (__builtin_expect ((ph->p_align & (GL(dl_pagesize) - 1)) != 0,
+	  if (__builtin_expect ((ph->p_align & (GLRO(dl_pagesize) - 1)) != 0,
 				0))
 	    {
 	      errstring = N_("ELF load command alignment not page-aligned");
@@ -944,8 +944,8 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
 
 	  c = &loadcmds[nloadcmds++];
 	  c->mapstart = ph->p_vaddr & ~(ph->p_align - 1);
-	  c->mapend = ((ph->p_vaddr + ph->p_filesz + GL(dl_pagesize) - 1)
-		       & ~(GL(dl_pagesize) - 1));
+	  c->mapend = ((ph->p_vaddr + ph->p_filesz + GLRO(dl_pagesize) - 1)
+		       & ~(GLRO(dl_pagesize) - 1));
 	  c->dataend = ph->p_vaddr + ph->p_filesz;
 	  c->allocend = ph->p_vaddr + ph->p_memsz;
 	  c->mapoff = ph->p_offset & ~(ph->p_align - 1);
@@ -1090,7 +1090,7 @@ cannot allocate TLS data structures for initial thread");
 	   the OS can do whatever it likes. */
 	ElfW(Addr) mappref;
 	mappref = (ELF_PREFERRED_ADDRESS (loader, maplength,
-					  c->mapstart & GL(dl_use_load_bias))
+					  c->mapstart & GLRO(dl_use_load_bias))
 		   - MAP_BASE_ADDR (l));
 
 	/* Remember which part of the address space this object uses.  */
@@ -1164,8 +1164,8 @@ cannot allocate TLS data structures for initial thread");
 
 	    zero = l->l_addr + c->dataend;
 	    zeroend = l->l_addr + c->allocend;
-	    zeropage = ((zero + GL(dl_pagesize) - 1)
-			& ~(GL(dl_pagesize) - 1));
+	    zeropage = ((zero + GLRO(dl_pagesize) - 1)
+			& ~(GLRO(dl_pagesize) - 1));
 
 	    if (zeroend < zeropage)
 	      /* All the extra data is in the last page of the segment.
@@ -1178,8 +1178,9 @@ cannot allocate TLS data structures for initial thread");
 		if (__builtin_expect ((c->prot & PROT_WRITE) == 0, 0))
 		  {
 		    /* Dag nab it.  */
-		    if (__mprotect ((caddr_t) (zero & ~(GL(dl_pagesize) - 1)),
-				    GL(dl_pagesize), c->prot|PROT_WRITE) < 0)
+		    if (__mprotect ((caddr_t) (zero
+					       & ~(GLRO(dl_pagesize) - 1)),
+				    GLRO(dl_pagesize), c->prot|PROT_WRITE) < 0)
 		      {
 			errstring = N_("cannot change memory protections");
 			goto call_lose_errno;
@@ -1187,8 +1188,8 @@ cannot allocate TLS data structures for initial thread");
 		  }
 		memset ((void *) zero, '\0', zeropage - zero);
 		if (__builtin_expect ((c->prot & PROT_WRITE) == 0, 0))
-		  __mprotect ((caddr_t) (zero & ~(GL(dl_pagesize) - 1)),
-			      GL(dl_pagesize), c->prot);
+		  __mprotect ((caddr_t) (zero & ~(GLRO(dl_pagesize) - 1)),
+			      GLRO(dl_pagesize), c->prot);
 	      }
 
 	    if (zeroend > zeropage)
@@ -1258,7 +1259,7 @@ cannot allocate TLS data structures for initial thread");
 
   l->l_entry += l->l_addr;
 
-  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_FILES, 0))
+  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
     INTUSE(_dl_debug_printf) ("\
   dynamic: 0x%0*lx  base: 0x%0*lx   size: 0x%0*Zx\n\
     entry: 0x%0*lx  phdr: 0x%0*lx  phnum:   %*u\n\n",
@@ -1350,7 +1351,7 @@ cannot enable executable stack as shared object requires");
 
   /* When we profile the SONAME might be needed for something else but
      loading.  Add it right away.  */
-  if (__builtin_expect (GL(dl_profile) != NULL, 0)
+  if (__builtin_expect (GLRO(dl_profile) != NULL, 0)
       && l->l_info[DT_SONAME] != NULL)
     add_name_to_object (l, ((const char *) D_PTR (l, l_info[DT_STRTAB])
 			    + l->l_info[DT_SONAME]->d_un.d_val));
@@ -1570,7 +1571,7 @@ open_verify (const char *name, struct filebuf *fbp)
 			+ (abi_note[6] & 0xff) * 256
 			+ (abi_note[7] & 0xff);
 	    if (abi_note[4] != __ABI_TAG_OS
-		|| (GL(dl_osversion) && GL(dl_osversion) < osversion))
+		|| (GLRO(dl_osversion) && GLRO(dl_osversion) < osversion))
 	      {
 	      close_and_out:
 		__close (fd);
@@ -1615,7 +1616,7 @@ open_path (const char *name, size_t namelen, int preloaded,
 
       /* If we are debugging the search for libraries print the path
 	 now if it hasn't happened now.  */
-      if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_LIBS, 0)
+      if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS, 0)
 	  && current_what != this_dir->what)
 	{
 	  current_what = this_dir->what;
@@ -1636,7 +1637,7 @@ open_path (const char *name, size_t namelen, int preloaded,
 	     - buf);
 
 	  /* Print name we try if this is wanted.  */
-	  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_LIBS, 0))
+	  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS, 0))
 	    INTUSE(_dl_debug_printf) ("  trying file=%s\n", buf);
 
 	  fd = open_verify (buf, fbp);
@@ -1769,7 +1770,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
     }
 
   /* Display information if we are debugging.  */
-  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_FILES, 0)
+  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)
       && loader != NULL)
     INTUSE(_dl_debug_printf) ("\nfile=%s;  needed by %s\n", name,
 			      loader->l_name[0]
@@ -1781,7 +1782,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
 
       size_t namelen = strlen (name) + 1;
 
-      if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_LIBS, 0))
+      if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS, 0))
 	INTUSE(_dl_debug_printf) ("find library=%s; searching\n", name);
 
       fd = -1;
@@ -1886,7 +1887,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
 			&realname, &fb);
 
       /* Add another newline when we are tracing the library loading.  */
-      if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_LIBS, 0))
+      if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS, 0))
         INTUSE(_dl_debug_printf) ("\n");
     }
   else
@@ -1908,7 +1909,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded,
   if (__builtin_expect (fd, 0) == -1)
     {
       if (trace_mode
-	  && __builtin_expect (GL(dl_debug_mask) & DL_DEBUG_PRELINK, 0) == 0)
+	  && __builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK, 0) == 0)
 	{
 	  /* We haven't found an appropriate library.  But since we
 	     are only interested in the list of libraries this isn't
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 9d9a12efbf..f4ebd93fc3 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -1,5 +1,5 @@
 /* Look up a symbol in the loaded objects.
-   Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1995-2002, 2003, 2004 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
@@ -190,7 +190,7 @@ add_dependency (struct link_map *undef_map, struct link_map *map)
 	  ++(*list)->l_opencount;
 
       /* Display information if we are debugging.  */
-      if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_FILES, 0))
+      if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
 	INTUSE(_dl_debug_printf) ("\
 \nfile=%s;  needed by %s (relocation dependency)\n\n",
 				  map->l_name[0] ? map->l_name : rtld_progname,
@@ -315,7 +315,7 @@ _dl_lookup_symbol (const char *undef_name, struct link_map *undef_map,
       return INTUSE(_dl_lookup_symbol) (undef_name, undef_map, ref,
 					symbol_scope, type_class, flags);
 
-  if (__builtin_expect (GL(dl_debug_mask)
+  if (__builtin_expect (GLRO(dl_debug_mask)
 			& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
     _dl_debug_bindings (undef_name, undef_map, ref, symbol_scope,
 			&current_value, NULL, type_class, protected);
@@ -389,7 +389,7 @@ _dl_lookup_symbol_skip (const char *undef_name,
 	}
     }
 
-  if (__builtin_expect (GL(dl_debug_mask)
+  if (__builtin_expect (GLRO(dl_debug_mask)
 			& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
     _dl_debug_bindings (undef_name, undef_map, ref, symbol_scope,
 			&current_value, NULL, 0, protected);
@@ -522,7 +522,7 @@ _dl_lookup_versioned_symbol (const char *undef_name,
 						  ref, symbol_scope,
 						  version, type_class, flags);
 
-  if (__builtin_expect (GL(dl_debug_mask)
+  if (__builtin_expect (GLRO(dl_debug_mask)
 			& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
     _dl_debug_bindings (undef_name, undef_map, ref, symbol_scope,
 			&current_value, version, type_class, protected);
@@ -609,7 +609,7 @@ _dl_lookup_versioned_symbol_skip (const char *undef_name,
 	}
     }
 
-  if (__builtin_expect (GL(dl_debug_mask)
+  if (__builtin_expect (GLRO(dl_debug_mask)
 			& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
     _dl_debug_bindings (undef_name, undef_map, ref, symbol_scope,
 			&current_value, version, 0, protected);
@@ -650,7 +650,7 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
 {
   const char *reference_name = undef_map->l_name;
 
-  if (GL(dl_debug_mask) & DL_DEBUG_BINDINGS)
+  if (GLRO(dl_debug_mask) & DL_DEBUG_BINDINGS)
     {
       INTUSE(_dl_debug_printf) ("binding file %s to %s: %s symbol `%s'",
 				(reference_name[0]
@@ -666,13 +666,13 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
 	_dl_debug_printf_c ("\n");
     }
 #ifdef SHARED
-  if (GL(dl_debug_mask) & DL_DEBUG_PRELINK)
+  if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
     {
       int conflict = 0;
       struct sym_val val = { NULL, NULL };
 
-      if ((GL(dl_trace_prelink_map) == NULL
-	   || GL(dl_trace_prelink_map) == GL(dl_loaded))
+      if ((GLRO(dl_trace_prelink_map) == NULL
+	   || GLRO(dl_trace_prelink_map) == GL(dl_loaded))
 	  && undef_map != GL(dl_loaded))
 	{
 	  const unsigned long int hash = _dl_elf_hash (undef_name);
@@ -698,8 +698,8 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
 #endif
 
       if (conflict
-	  || GL(dl_trace_prelink_map) == undef_map
-	  || GL(dl_trace_prelink_map) == NULL
+	  || GLRO(dl_trace_prelink_map) == undef_map
+	  || GLRO(dl_trace_prelink_map) == NULL
 	  || type_class == 4)
 	{
 	  _dl_printf ("%s 0x%0*Zx 0x%0*Zx -> 0x%0*Zx 0x%0*Zx ",
diff --git a/elf/dl-minimal.c b/elf/dl-minimal.c
index 3a51df30fb..4ec2ebcbb4 100644
--- a/elf/dl-minimal.c
+++ b/elf/dl-minimal.c
@@ -1,5 +1,5 @@
 /* Minimal replacements for basic facilities used in the dynamic linker.
-   Copyright (C) 1995,96,97,98,2000,2001,2002 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998,2000-2002,2004 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
@@ -66,8 +66,8 @@ __libc_memalign (size_t align, size_t n)
       extern int _end attribute_hidden;
       alloc_ptr = &_end;
       alloc_end = (void *) 0 + (((alloc_ptr - (void *) 0)
-				 + GL(dl_pagesize) - 1)
-				& ~(GL(dl_pagesize) - 1));
+				 + GLRO(dl_pagesize) - 1)
+				& ~(GLRO(dl_pagesize) - 1));
     }
 
   /* Make sure the allocation pointer is ideally aligned.  */
@@ -78,7 +78,7 @@ __libc_memalign (size_t align, size_t n)
     {
       /* Insufficient space left; allocate another page.  */
       caddr_t page;
-      size_t nup = (n + GL(dl_pagesize) - 1) & ~(GL(dl_pagesize) - 1);
+      size_t nup = (n + GLRO(dl_pagesize) - 1) & ~(GLRO(dl_pagesize) - 1);
       page = __mmap (0, nup, PROT_READ|PROT_WRITE,
 		     MAP_ANON|MAP_PRIVATE, _dl_zerofd, 0);
       assert (page != MAP_FAILED);
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 9befbc41cf..09687d8940 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -308,7 +308,7 @@ dl_open_worker (void *a)
   if (new->l_searchlist.r_list != NULL)
     {
       /* Let the user know about the opencount.  */
-      if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_FILES, 0))
+      if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
 	_dl_debug_printf ("opening file=%s; opencount == %u\n\n",
 			  new->l_name, new->l_opencount);
 
@@ -336,7 +336,7 @@ dl_open_worker (void *a)
 #endif
 
   /* Only do lazy relocation if `LD_BIND_NOW' is not set.  */
-  lazy = (mode & RTLD_BINDING_MASK) == RTLD_LAZY && GL(dl_lazy);
+  lazy = (mode & RTLD_BINDING_MASK) == RTLD_LAZY && GLRO(dl_lazy);
 
   /* Relocate the objects loaded.  We do this in reverse order so that copy
      relocs of earlier objects overwrite the data written by later objects.  */
@@ -349,7 +349,7 @@ dl_open_worker (void *a)
       if (! l->l_relocated)
 	{
 #ifdef SHARED
-	  if (GL(dl_profile) != NULL)
+	  if (GLRO(dl_profile) != NULL)
 	    {
 	      /* If this here is the shared object which we want to profile
 		 make sure the profile is started.  We can find out whether
@@ -362,7 +362,8 @@ dl_open_worker (void *a)
 
 	      if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
 		/* We must prepare the profiling.  */
-		_dl_start_profile (GL(dl_profile_map), GL(dl_profile_output));
+		_dl_start_profile (GL(dl_profile_map),
+				   GLRO(dl_profile_output));
 	    }
 	  else
 #endif
@@ -548,7 +549,7 @@ dl_open_worker (void *a)
 #endif
 
   /* Let the user know about the opencount.  */
-  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_FILES, 0))
+  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
     _dl_debug_printf ("opening file=%s; opencount == %u\n\n",
 		      new->l_name, new->l_opencount);
 }
diff --git a/elf/dl-profile.c b/elf/dl-profile.c
index be706cefbf..164ae98f99 100644
--- a/elf/dl-profile.c
+++ b/elf/dl-profile.c
@@ -1,5 +1,5 @@
 /* Profiling of shared libraries.
-   Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1997-2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
    Based on the BSD mcount implementation.
@@ -198,9 +198,9 @@ _dl_start_profile (struct link_map *map, const char *output_dir)
   for (ph = map->l_phdr; ph < &map->l_phdr[map->l_phnum]; ++ph)
     if (ph->p_type == PT_LOAD && (ph->p_flags & PF_X))
       {
-	ElfW(Addr) start = (ph->p_vaddr & ~(GL(dl_pagesize) - 1));
-	ElfW(Addr) end = ((ph->p_vaddr + ph->p_memsz + GL(dl_pagesize) - 1)
-			  & ~(GL(dl_pagesize) - 1));
+	ElfW(Addr) start = (ph->p_vaddr & ~(GLRO(dl_pagesize) - 1));
+	ElfW(Addr) end = ((ph->p_vaddr + ph->p_memsz + GLRO(dl_pagesize) - 1)
+			  & ~(GLRO(dl_pagesize) - 1));
 
 	if (start < mapstart)
 	  mapstart = start;
@@ -273,11 +273,11 @@ _dl_start_profile (struct link_map *map, const char *output_dir)
   /* First determine the output name.  We write in the directory
      OUTPUT_DIR and the name is composed from the shared objects
      soname (or the file name) and the ending ".profile".  */
-  filename = (char *) alloca (strlen (output_dir) + 1 + strlen (GL(dl_profile))
-			      + sizeof ".profile");
+  filename = (char *) alloca (strlen (output_dir) + 1
+			      + strlen (GLRO(dl_profile)) + sizeof ".profile");
   cp = __stpcpy (filename, output_dir);
   *cp++ = '/';
-  __stpcpy (__stpcpy (cp, GL(dl_profile)), ".profile");
+  __stpcpy (__stpcpy (cp, GLRO(dl_profile)), ".profile");
 
 #ifdef O_NOFOLLOW
 # define EXTRA_FLAGS | O_NOFOLLOW
@@ -310,11 +310,11 @@ _dl_start_profile (struct link_map *map, const char *output_dir)
   if (st.st_size == 0)
     {
       /* We have to create the file.  */
-      char buf[GL(dl_pagesize)];
+      char buf[GLRO(dl_pagesize)];
 
-      memset (buf, '\0', GL(dl_pagesize));
+      memset (buf, '\0', GLRO(dl_pagesize));
 
-      if (__lseek (fd, expected_size & ~(GL(dl_pagesize) - 1), SEEK_SET) == -1)
+      if (__lseek (fd, expected_size & ~(GLRO(dl_pagesize) - 1), SEEK_SET) == -1)
 	{
 	  char buf[400];
 	  int errnum;
@@ -327,7 +327,7 @@ _dl_start_profile (struct link_map *map, const char *output_dir)
 	}
 
       if (TEMP_FAILURE_RETRY (__libc_write (fd, buf, (expected_size
-						      & (GL(dl_pagesize)
+						      & (GLRO(dl_pagesize)
 							 - 1))))
 	  < 0)
 	goto cannot_create;
@@ -341,7 +341,7 @@ _dl_start_profile (struct link_map *map, const char *output_dir)
 	__munmap ((void *) addr, expected_size);
 
       _dl_error_printf ("%s: file is no correct profile data file for `%s'\n",
-			filename, GL(dl_profile));
+			filename, GLRO(dl_profile));
       return;
     }
 
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index 0fda3de3a7..dab5dea13b 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -146,7 +146,7 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
       && __builtin_expect (l->l_info[DT_BIND_NOW] != NULL, 0))
     lazy = 0;
 
-  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_RELOC, 0))
+  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_RELOC, 0))
     INTUSE(_dl_debug_printf) ("\nrelocation processing: %s%s\n",
 			      l->l_name[0] ? l->l_name : rtld_progname,
 			      lazy ? " (lazy)" : "");
@@ -165,10 +165,10 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
 	    struct textrels *newp;
 
 	    newp = (struct textrels *) alloca (sizeof (*newp));
-	    newp->len = (((ph->p_vaddr + ph->p_memsz + GL(dl_pagesize) - 1)
-			  & ~(GL(dl_pagesize) - 1))
-			 - (ph->p_vaddr & ~(GL(dl_pagesize) - 1)));
-	    newp->start = ((ph->p_vaddr & ~(GL(dl_pagesize) - 1))
+	    newp->len = (((ph->p_vaddr + ph->p_memsz + GLRO(dl_pagesize) - 1)
+			  & ~(GLRO(dl_pagesize) - 1))
+			 - (ph->p_vaddr & ~(GLRO(dl_pagesize) - 1)));
+	    newp->start = ((ph->p_vaddr & ~(GLRO(dl_pagesize) - 1))
 			   + (caddr_t) l->l_addr);
 
 	    if (__mprotect (newp->start, newp->len, PROT_READ|PROT_WRITE) < 0)
@@ -318,9 +318,10 @@ INTDEF (_dl_relocate_object)
 void internal_function
 _dl_protect_relro (struct link_map *l)
 {
-  ElfW(Addr) start = ((l->l_addr + l->l_relro_addr) & ~(GL(dl_pagesize) - 1));
+  ElfW(Addr) start = ((l->l_addr + l->l_relro_addr)
+		      & ~(GLRO(dl_pagesize) - 1));
   ElfW(Addr) end = ((l->l_addr + l->l_relro_addr + l->l_relro_size)
-		    & ~(GL(dl_pagesize) - 1));
+		    & ~(GLRO(dl_pagesize) - 1));
 
   if (start != end
       && __mprotect ((void *) start, end - start, PROT_READ) < 0)
diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c
index 2992f652c6..b71dee5e75 100644
--- a/elf/dl-runtime.c
+++ b/elf/dl-runtime.c
@@ -118,7 +118,7 @@ fixup (
   value = elf_machine_plt_value (l, reloc, value);
 
   /* Finally, fix up the plt itself.  */
-  if (__builtin_expect (GL(dl_bind_not), 0))
+  if (__builtin_expect (GLRO(dl_bind_not), 0))
     return value;
 
   return elf_machine_fixup_plt (l, result, reloc, rel_addr, value);
@@ -209,7 +209,7 @@ profile_fixup (
       value = elf_machine_plt_value (l, reloc, value);
 
       /* Store the result for later runs.  */
-      if (__builtin_expect (! GL(dl_bind_not), 1))
+      if (__builtin_expect (! GLRO(dl_bind_not), 1))
 	*resultp = value;
     }
 
diff --git a/elf/dl-support.c b/elf/dl-support.c
index aeebf3c5e2..44335e8a8e 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -175,10 +175,10 @@ _dl_aux_init (ElfW(auxv_t) *av)
     switch (av->a_type)
       {
       case AT_PAGESZ:
-	GL(dl_pagesize) = av->a_un.a_val;
+	GLRO(dl_pagesize) = av->a_un.a_val;
 	break;
       case AT_CLKTCK:
-	GL(dl_clktck) = av->a_un.a_val;
+	GLRO(dl_clktck) = av->a_un.a_val;
 	break;
       case AT_PHDR:
 	GL(dl_phdr) = av->a_un.a_ptr;
@@ -187,7 +187,7 @@ _dl_aux_init (ElfW(auxv_t) *av)
 	GL(dl_phnum) = av->a_un.a_val;
 	break;
       case AT_HWCAP:
-	GL(dl_hwcap) = av->a_un.a_val;
+	GLRO(dl_hwcap) = av->a_un.a_val;
 	break;
 #ifdef NEED_DL_SYSINFO
       case AT_SYSINFO:
diff --git a/elf/dl-version.c b/elf/dl-version.c
index 3daea87848..83d63f30de 100644
--- a/elf/dl-version.c
+++ b/elf/dl-version.c
@@ -1,5 +1,5 @@
 /* Handle symbol and library versioning.
-   Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1997-2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -87,7 +87,7 @@ match_symbol (const char *name, ElfW(Word) hash, const char *string,
   int result = 0;
 
   /* Display information about what we are doing while debugging.  */
-  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_VERSIONS, 0))
+  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_VERSIONS, 0))
     INTUSE(_dl_debug_printf) ("\
 checking for version `%s' in file %s required by file %s\n",
 			      string, map->l_name[0]
diff --git a/elf/do-lookup.h b/elf/do-lookup.h
index 8ba07253e3..15900cdf99 100644
--- a/elf/do-lookup.h
+++ b/elf/do-lookup.h
@@ -1,5 +1,5 @@
 /* Look up a symbol in the loaded objects.
-   Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1995-2002, 2003, 2004 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
@@ -60,7 +60,7 @@ FCT (const char *undef_name, unsigned long int hash, const ElfW(Sym) *ref,
 	continue;
 
       /* Print some debugging info if wanted.  */
-      if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_SYMBOLS, 0))
+      if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS, 0))
 	INTUSE(_dl_debug_printf) ("symbol=%s;  lookup in file=%s\n",
 				  undef_name, (map->l_name[0]
 					       ? map->l_name : rtld_progname));
@@ -183,7 +183,7 @@ FCT (const char *undef_name, unsigned long int hash, const ElfW(Sym) *ref,
 	    {
 	    case STB_WEAK:
 	      /* Weak definition.  Use this value if we don't find another.  */
-	      if (__builtin_expect (GL(dl_dynamic_weak), 0))
+	      if (__builtin_expect (GLRO(dl_dynamic_weak), 0))
 		{
 		  if (! result->s)
 		    {
diff --git a/elf/rtld.c b/elf/rtld.c
index 87a86bed32..943901f56b 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -95,14 +95,6 @@ struct rtld_global _rtld_global =
     /* Get architecture specific initializer.  */
 #include <dl-procinfo.c>
     ._dl_debug_fd = STDERR_FILENO,
-#ifdef NEED_DL_SYSINFO
-    ._dl_sysinfo = DL_SYSINFO_DEFAULT,
-#endif
-    ._dl_lazy = 1,
-    ._dl_use_load_bias = -2,
-    ._dl_fpu_control = _FPU_DEFAULT,
-    ._dl_correct_cache_id = _DL_CACHE_DEFAULT_ID,
-    ._dl_hwcap_mask = HWCAP_IMPORTANT,
     /* Default presumption without further information is executable stack.  */
     ._dl_stack_flags = PF_R|PF_W|PF_X,
 #ifdef _LIBC_REENTRANT
@@ -116,6 +108,28 @@ struct rtld_global _rtld_global =
 extern struct rtld_global _rtld_local
     __attribute__ ((alias ("_rtld_global"), visibility ("hidden")));
 
+
+/* This variable is similar to _rtld_local, but all values are
+   read-only after relocation.  */
+struct rtld_global_ro _rtld_global_ro attribute_relro =
+  {
+#ifdef NEED_DL_SYSINFO
+    ._dl_sysinfo = DL_SYSINFO_DEFAULT,
+#endif
+    ._dl_use_load_bias = -2,
+    ._dl_correct_cache_id = _DL_CACHE_DEFAULT_ID,
+    ._dl_hwcap_mask = HWCAP_IMPORTANT,
+    ._dl_lazy = 1,
+    ._dl_fpu_control = _FPU_DEFAULT,
+  };
+/* If we would use strong_alias here the compiler would see a
+   non-hidden definition.  This would undo the effect of the previous
+   declaration.  So spell out was strong_alias does plus add the
+   visibility attribute.  */
+extern struct rtld_global_ro _rtld_local_ro
+    __attribute__ ((alias ("_rtld_global_ro"), visibility ("hidden")));
+
+
 static void dl_main (const ElfW(Phdr) *phdr, ElfW(Word) phnum,
 		     ElfW(Addr) *user_entry);
 
@@ -280,7 +294,7 @@ _dl_start_final (void *arg, struct dl_start_final_info *info)
     }
 #endif
 
-  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_STATISTICS, 0))
+  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_STATISTICS, 0))
     {
 #ifndef HP_TIMING_NONAVAIL
       print_statistics (&rtld_total_time);
@@ -712,7 +726,7 @@ dl_main (const ElfW(Phdr) *phdr,
 	if (! strcmp (INTUSE(_dl_argv)[1], "--list"))
 	  {
 	    mode = list;
-	    GL(dl_lazy) = -1;	/* This means do no dependency analysis.  */
+	    GLRO(dl_lazy) = -1;	/* This means do no dependency analysis.  */
 
 	    ++_dl_skip_args;
 	    --_dl_argc;
@@ -738,7 +752,7 @@ dl_main (const ElfW(Phdr) *phdr,
 	else if (! strcmp (INTUSE(_dl_argv)[1], "--inhibit-rpath")
 		 && _dl_argc > 2)
 	  {
-	    GL(dl_inhibit_rpath) = INTUSE(_dl_argv)[2];
+	    GLRO(dl_inhibit_rpath) = INTUSE(_dl_argv)[2];
 
 	    _dl_skip_args += 2;
 	    _dl_argc -= 2;
@@ -1035,8 +1049,8 @@ of this helper program; chances are you did not intend to run this program.\n\
   /* If LD_USE_LOAD_BIAS env variable has not been seen, default
      to not using bias for non-prelinked PIEs and libraries
      and using it for executables or prelinked PIEs or libraries.  */
-  if (GL(dl_use_load_bias) == (ElfW(Addr)) -2)
-    GL(dl_use_load_bias) = (GL(dl_loaded)->l_addr == 0) ? -1 : 0;
+  if (GLRO(dl_use_load_bias) == (ElfW(Addr)) -2)
+    GLRO(dl_use_load_bias) = (GL(dl_loaded)->l_addr == 0) ? -1 : 0;
 
   /* Set up the program header information for the dynamic linker
      itself.  It is needed in the dl_iterate_phdr() callbacks.  */
@@ -1212,7 +1226,7 @@ ERROR: ld.so: object '%s' from %s cannot be preloaded: ignored.\n",
 
 #ifdef NEED_DL_SYSINFO
   struct link_map *sysinfo_map = NULL;
-  if (GL(dl_sysinfo_dso) != NULL)
+  if (GLRO(dl_sysinfo_dso) != NULL)
     {
       /* Do an abridged version of the work _dl_map_object_from_fd would do
 	 to map in the object.  It's already mapped and prelinked (and
@@ -1224,9 +1238,9 @@ ERROR: ld.so: object '%s' from %s cannot be preloaded: ignored.\n",
 	{
 	  static ElfW(Dyn) dyn_temp[DL_RO_DYN_TEMP_CNT];
 
-	  l->l_phdr = ((const void *) GL(dl_sysinfo_dso)
-		       + GL(dl_sysinfo_dso)->e_phoff);
-	  l->l_phnum = GL(dl_sysinfo_dso)->e_phnum;
+	  l->l_phdr = ((const void *) GLRO(dl_sysinfo_dso)
+		       + GLRO(dl_sysinfo_dso)->e_phoff);
+	  l->l_phnum = GLRO(dl_sysinfo_dso)->e_phnum;
 	  for (uint_fast16_t i = 0; i < l->l_phnum; ++i)
 	    {
 	      const ElfW(Phdr) *const ph = &l->l_phdr[i];
@@ -1243,7 +1257,7 @@ ERROR: ld.so: object '%s' from %s cannot be preloaded: ignored.\n",
 		    l->l_map_end = ph->p_vaddr + ph->p_memsz;
 		}
 	    }
-	  l->l_map_start = (ElfW(Addr)) GL(dl_sysinfo_dso);
+	  l->l_map_start = (ElfW(Addr)) GLRO(dl_sysinfo_dso);
 	  l->l_addr = l->l_map_start - l->l_addr;
 	  l->l_map_end += l->l_addr;
 	  l->l_ld = (void *) ((ElfW(Addr)) l->l_ld + l->l_addr);
@@ -1269,8 +1283,8 @@ ERROR: ld.so: object '%s' from %s cannot be preloaded: ignored.\n",
 	    }
 
 	  /* We have a prelinked DSO preloaded by the system.  */
-	  if (GL(dl_sysinfo) == DL_SYSINFO_DEFAULT)
-	    GL(dl_sysinfo) = GL(dl_sysinfo_dso)->e_entry + l->l_addr;
+	  if (GLRO(dl_sysinfo) == DL_SYSINFO_DEFAULT)
+	    GLRO(dl_sysinfo) = GLRO(dl_sysinfo_dso)->e_entry + l->l_addr;
 	  sysinfo_map = l;
 	}
     }
@@ -1437,7 +1451,7 @@ cannot allocate TLS data structures for initial thread");
 	 after relocation.  */
       struct link_map *l;
 
-      if (GL(dl_debug_mask) & DL_DEBUG_PRELINK)
+      if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
 	{
 	  struct r_scope_elem *scope = &GL(dl_loaded)->l_searchlist;
 
@@ -1449,8 +1463,8 @@ cannot allocate TLS data structures for initial thread");
 		  _dl_printf ("\t%s => not found\n", l->l_libname->name);
 		  continue;
 		}
-	      if (_dl_name_match_p (GL(dl_trace_prelink), l))
-		GL(dl_trace_prelink_map) = l;
+	      if (_dl_name_match_p (GLRO(dl_trace_prelink), l))
+		GLRO(dl_trace_prelink_map) = l;
 	      _dl_printf ("\t%s => %s (0x%0*Zx, 0x%0*Zx)",
 			  l->l_libname->name[0] ? l->l_libname->name
 			  : rtld_progname ?: "<main program>",
@@ -1507,13 +1521,13 @@ cannot allocate TLS data structures for initial thread");
       else
 	{
 	  /* If LD_WARN is set warn about undefined symbols.  */
-	  if (GL(dl_lazy) >= 0 && GL(dl_verbose))
+	  if (GLRO(dl_lazy) >= 0 && GLRO(dl_verbose))
 	    {
 	      /* We have to do symbol dependency testing.  */
 	      struct relocate_args args;
 	      struct link_map *l;
 
-	      args.lazy = GL(dl_lazy);
+	      args.lazy = GLRO(dl_lazy);
 
 	      l = GL(dl_loaded);
 	      while (l->l_next)
@@ -1529,7 +1543,7 @@ cannot allocate TLS data structures for initial thread");
 		  l = l->l_prev;
 		} while (l);
 
-	      if ((GL(dl_debug_mask) & DL_DEBUG_PRELINK)
+	      if ((GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
 		  && GL(dl_rtld_map).l_opencount > 1)
 		INTUSE(_dl_relocate_object) (&GL(dl_rtld_map),
 					     GL(dl_loaded)->l_scope, 0, 0);
@@ -1612,7 +1626,7 @@ cannot allocate TLS data structures for initial thread");
     }
 
   if (GL(dl_loaded)->l_info [ADDRIDX (DT_GNU_LIBLIST)]
-      && ! __builtin_expect (GL(dl_profile) != NULL, 0))
+      && ! __builtin_expect (GLRO(dl_profile) != NULL, 0))
     {
       ElfW(Lib) *liblist, *liblistend;
       struct link_map **r_list, **r_listend, *l;
@@ -1660,7 +1674,7 @@ cannot allocate TLS data structures for initial thread");
       if (r_list == r_listend && liblist == liblistend)
 	prelinked = true;
 
-      if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_LIBS, 0))
+      if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS, 0))
 	_dl_printf ("\nprelink checking: %s\n", prelinked ? "ok" : "failed");
     }
 
@@ -1740,7 +1754,7 @@ cannot allocate TLS data structures for initial thread");
 	 know that because it is self-contained).  */
 
       struct link_map *l;
-      int consider_profiling = GL(dl_profile) != NULL;
+      int consider_profiling = GLRO(dl_profile) != NULL;
 #ifndef HP_TIMING_NONAVAIL
       hp_timing_t start;
       hp_timing_t stop;
@@ -1748,7 +1762,7 @@ cannot allocate TLS data structures for initial thread");
 #endif
 
       /* If we are profiling we also must do lazy reloaction.  */
-      GL(dl_lazy) |= consider_profiling;
+      GLRO(dl_lazy) |= consider_profiling;
 
       l = GL(dl_loaded);
       while (l->l_next)
@@ -1769,7 +1783,7 @@ cannot allocate TLS data structures for initial thread");
 	    }
 
 	  if (l != &GL(dl_rtld_map))
-	    INTUSE(_dl_relocate_object) (l, l->l_scope, GL(dl_lazy),
+	    INTUSE(_dl_relocate_object) (l, l->l_scope, GLRO(dl_lazy),
 					 consider_profiling);
 
 	  l = l->l_prev;
@@ -1792,7 +1806,8 @@ cannot allocate TLS data structures for initial thread");
 	 needs to have _dl_profile_map set up by the relocator.  */
       if (__builtin_expect (GL(dl_profile_map) != NULL, 0))
 	/* We must prepare the profiling.  */
-	INTUSE(_dl_start_profile) (GL(dl_profile_map), GL(dl_profile_output));
+	INTUSE(_dl_start_profile) (GL(dl_profile_map),
+				   GLRO(dl_profile_output));
 
       if (GL(dl_rtld_map).l_opencount > 1)
 	{
@@ -1928,7 +1943,7 @@ process_dl_debug (const char *dl_debug)
 	    if (debopts[cnt].len == len
 		&& memcmp (dl_debug, debopts[cnt].name, len) == 0)
 	      {
-		GL(dl_debug_mask) |= debopts[cnt].mask;
+		GLRO(dl_debug_mask) |= debopts[cnt].mask;
 		any_debug = 1;
 		break;
 	      }
@@ -1949,7 +1964,7 @@ warning: debug option `%s' unknown; try LD_DEBUG=help\n", copy);
       ++dl_debug;
     }
 
-  if (GL(dl_debug_mask) & DL_DEBUG_HELP)
+  if (GLRO(dl_debug_mask) & DL_DEBUG_HELP)
     {
       size_t cnt;
 
@@ -1983,7 +1998,7 @@ process_envvars (enum mode *modep)
   char *debug_output = NULL;
 
   /* This is the default place for profiling data file.  */
-  GL(dl_profile_output)
+  GLRO(dl_profile_output)
     = &"/var/tmp\0/var/profile"[INTUSE(__libc_enable_secure) ? 9 : 0];
 
   while ((envline = _dl_next_ld_env_entry (&runp)) != NULL)
@@ -2004,7 +2019,7 @@ process_envvars (enum mode *modep)
 	case 4:
 	  /* Warning level, verbose or not.  */
 	  if (memcmp (envline, "WARN", 4) == 0)
-	    GL(dl_verbose) = envline[5] != '\0';
+	    GLRO(dl_verbose) = envline[5] != '\0';
 	  break;
 
 	case 5:
@@ -2030,18 +2045,18 @@ process_envvars (enum mode *modep)
 
 	  /* Which shared object shall be profiled.  */
 	  if (memcmp (envline, "PROFILE", 7) == 0 && envline[8] != '\0')
-	    GL(dl_profile) = &envline[8];
+	    GLRO(dl_profile) = &envline[8];
 	  break;
 
 	case 8:
 	  /* Do we bind early?  */
 	  if (memcmp (envline, "BIND_NOW", 8) == 0)
 	    {
-	      GL(dl_lazy) = envline[9] == '\0';
+	      GLRO(dl_lazy) = envline[9] == '\0';
 	      break;
 	    }
 	  if (memcmp (envline, "BIND_NOT", 8) == 0)
-	    GL(dl_bind_not) = envline[9] != '\0';
+	    GLRO(dl_bind_not) = envline[9] != '\0';
 	  break;
 
 	case 9:
@@ -2054,14 +2069,15 @@ process_envvars (enum mode *modep)
 	case 10:
 	  /* Mask for the important hardware capabilities.  */
 	  if (memcmp (envline, "HWCAP_MASK", 10) == 0)
-	    GL(dl_hwcap_mask) = __strtoul_internal (&envline[11], NULL, 0, 0);
+	    GLRO(dl_hwcap_mask) = __strtoul_internal (&envline[11], NULL,
+						      0, 0);
 	  break;
 
 	case 11:
 	  /* Path where the binary is found.  */
 	  if (!INTUSE(__libc_enable_secure)
 	      && memcmp (envline, "ORIGIN_PATH", 11) == 0)
-	    GL(dl_origin_path) = &envline[12];
+	    GLRO(dl_origin_path) = &envline[12];
 	  break;
 
 	case 12:
@@ -2080,7 +2096,7 @@ process_envvars (enum mode *modep)
 	    }
 
 	  if (memcmp (envline, "DYNAMIC_WEAK", 12) == 0)
-	    GL(dl_dynamic_weak) = 1;
+	    GLRO(dl_dynamic_weak) = 1;
 	  break;
 
 	case 13:
@@ -2091,7 +2107,7 @@ process_envvars (enum mode *modep)
 #endif
 	  if (!INTUSE(__libc_enable_secure)
 	      && memcmp (envline, "USE_LOAD_BIAS", 13) == 0)
-	    GL(dl_use_load_bias) = envline[14] == '1' ? -1 : 0;
+	    GLRO(dl_use_load_bias) = envline[14] == '1' ? -1 : 0;
 	  break;
 
 	case 14:
@@ -2099,7 +2115,7 @@ process_envvars (enum mode *modep)
 	  if (!INTUSE(__libc_enable_secure)
 	      && memcmp (envline, "PROFILE_OUTPUT", 14) == 0
 	      && envline[15] != '\0')
-	    GL(dl_profile_output) = &envline[15];
+	    GLRO(dl_profile_output) = &envline[15];
 	  break;
 
 	case 16:
@@ -2107,9 +2123,9 @@ process_envvars (enum mode *modep)
 	  if (memcmp (envline, "TRACE_PRELINKING", 16) == 0)
 	    {
 	      mode = trace;
-	      GL(dl_verbose) = 1;
-	      GL(dl_debug_mask) |= DL_DEBUG_PRELINK;
-	      GL(dl_trace_prelink) = &envline[17];
+	      GLRO(dl_verbose) = 1;
+	      GLRO(dl_debug_mask) |= DL_DEBUG_PRELINK;
+	      GLRO(dl_trace_prelink) = &envline[17];
 	    }
 	  break;
 
diff --git a/nptl/sysdeps/i386/tls.h b/nptl/sysdeps/i386/tls.h
index a7abe703ab..18b038f93e 100644
--- a/nptl/sysdeps/i386/tls.h
+++ b/nptl/sysdeps/i386/tls.h
@@ -1,5 +1,5 @@
 /* Definition for thread-local data handling.  nptl/i386 version.
-   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004 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
@@ -166,7 +166,7 @@ union user_desc_init
 
 #if defined NEED_DL_SYSINFO
 # define INIT_SYSINFO \
-  _head->sysinfo = GL(dl_sysinfo)
+  _head->sysinfo = GLRO(dl_sysinfo)
 #else
 # define INIT_SYSINFO
 #endif
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 3616faedbf..35d7e1dbde 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -114,7 +114,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 	{
 	  *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_profile;
 
-	  if (_dl_name_match_p (GL(dl_profile), l))
+	  if (_dl_name_match_p (GLRO(dl_profile), l))
 	    {
 	      /* This is the object we are looking for.  Say that we really
 		 want profiling and the timers are started.  */
@@ -648,7 +648,7 @@ static inline void
 elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
 			   void *const reloc_addr_arg)
 {
-  /* XXX Make some timings.  Maybe it's preferable to test for 
+  /* XXX Make some timings.  Maybe it's preferable to test for
      unaligned access and only do it the complex way if necessary.  */
   Elf64_Addr reloc_addr_val;
 
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 9b1d53a0a1..25a8515dac 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -1,5 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  ARM version.
-   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -110,7 +110,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 	{
 	  got[2] = (Elf32_Addr) &_dl_runtime_profile;
 
-	  if (_dl_name_match_p (GL(dl_profile), l))
+	  if (_dl_name_match_p (GLRO(dl_profile), l))
 	    /* Say that we really want profiling and the timers are
 	       started.  */
 	    GL(dl_profile_map) = l;
@@ -334,9 +334,9 @@ _dl_start_user:\n\
 static inline void __attribute__ ((unused))
 dl_platform_init (void)
 {
-  if (GL(dl_platform) != NULL && *GL(dl_platform) == '\0')
+  if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0')
     /* Avoid an empty string which would disturb us.  */
-    GL(dl_platform) = NULL;
+    GLRO(dl_platform) = NULL;
 }
 
 static inline Elf32_Addr
@@ -444,7 +444,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
 	       found.  */
 	    break;
 	  if (sym->st_size > refsym->st_size
-	      || (GL(dl_verbose) && sym->st_size < refsym->st_size))
+	      || (GLRO(dl_verbose) && sym->st_size < refsym->st_size))
 	    {
 	      const char *strtab;
 
@@ -556,7 +556,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
 	       found.  */
 	    break;
 	  if (sym->st_size > refsym->st_size
-	      || (GL(dl_verbose) && sym->st_size < refsym->st_size))
+	      || (GLRO(dl_verbose) && sym->st_size < refsym->st_size))
 	    {
 	      const char *strtab;
 
diff --git a/sysdeps/generic/dl-cache.c b/sysdeps/generic/dl-cache.c
index b17c18baf9..5a44148a44 100644
--- a/sysdeps/generic/dl-cache.c
+++ b/sysdeps/generic/dl-cache.c
@@ -1,5 +1,5 @@
 /* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
-   Copyright (C) 1996-2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1996-2002, 2003, 2004 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
@@ -107,12 +107,12 @@ do									      \
 		if (_dl_cache_check_flags (flags)			      \
 		    && _dl_cache_verify_ptr (lib->value))		      \
 		  {							      \
-		    if (best == NULL || flags == GL(dl_correct_cache_id))     \
+		    if (best == NULL || flags == GLRO(dl_correct_cache_id))   \
 		      {							      \
 			HWCAP_CHECK;					      \
 			best = cache_data + lib->value;			      \
 									      \
-			if (flags == GL(dl_correct_cache_id))		      \
+			if (flags == GLRO(dl_correct_cache_id))		      \
 			  /* We've found an exact match for the shared	      \
 			     object and no general `ELF' release.  Stop	      \
 			     searching.  */				      \
@@ -187,7 +187,7 @@ _dl_load_cache_lookup (const char *name)
   const char *best;
 
   /* Print a message if the loading of libs is traced.  */
-  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_LIBS, 0))
+  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS, 0))
     INTUSE(_dl_debug_printf) (" search cache=%s\n", LD_SO_CACHE);
 
   if (cache == NULL)
@@ -256,15 +256,15 @@ _dl_load_cache_lookup (const char *name)
       /* Now we can compute how large the string table is.  */
       cache_data_size = (const char *) cache + cachesize - cache_data;
 
-      hwcap = &GL(dl_hwcap);
-      platform = _dl_string_platform (GL(dl_platform));
+      hwcap = &GLRO(dl_hwcap);
+      platform = _dl_string_platform (GLRO(dl_platform));
       if (platform != (uint64_t) -1)
 	platform = 1ULL << platform;
 
       /* Only accept hwcap if it's for the right platform.  */
 #define HWCAP_CHECK \
-      if (GL(dl_osversion)						      \
-	  && cache_new->libs[middle].osversion > GL(dl_osversion))	      \
+      if (GLRO(dl_osversion)						      \
+	  && cache_new->libs[middle].osversion > GLRO(dl_osversion))	      \
 	continue;							      \
       if (_DL_PLATFORMS_COUNT && platform != -1				      \
 	  && (lib->hwcap & _DL_HWCAP_PLATFORM) != 0			      \
@@ -289,7 +289,8 @@ _dl_load_cache_lookup (const char *name)
     }
 
   /* Print our result if wanted.  */
-  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_LIBS, 0) && best != NULL)
+  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS, 0)
+      && best != NULL)
     INTUSE(_dl_debug_printf) ("  trying file=%s\n", best);
 
   return best;
diff --git a/sysdeps/generic/dl-origin.c b/sysdeps/generic/dl-origin.c
index b198f70d5d..4837c2e721 100644
--- a/sysdeps/generic/dl-origin.c
+++ b/sysdeps/generic/dl-origin.c
@@ -1,5 +1,5 @@
 /* Find path of executable.
-   Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -33,15 +33,15 @@ _dl_get_origin (void)
   char *result = (char *) -1;
   /* We use the environment variable LD_ORIGIN_PATH.  If it is set make
      a copy and strip out trailing slashes.  */
-  if (GL(dl_origin_path) != NULL)
+  if (GLRO(dl_origin_path) != NULL)
     {
-      size_t len = strlen (GL(dl_origin_path));
+      size_t len = strlen (GLRO(dl_origin_path));
       result = (char *) malloc (len + 1);
       if (result == NULL)
 	result = (char *) -1;
       else
 	{
-	  char *cp = __mempcpy (result, GL(dl_origin_path), len);
+	  char *cp = __mempcpy (result, GLRO(dl_origin_path), len);
 	  while (cp > result + 1 && cp[-1] == '/')
 	    --cp;
 	  *cp = '\0';
diff --git a/sysdeps/generic/dl-sysdep.c b/sysdeps/generic/dl-sysdep.c
index bdd7326c58..e9eccd5dc3 100644
--- a/sysdeps/generic/dl-sysdep.c
+++ b/sysdeps/generic/dl-sysdep.c
@@ -107,7 +107,7 @@ _dl_sysdep_start (void **start_argptr,
 			  _dl_auxv);
 
   user_entry = (ElfW(Addr)) ENTRY_POINT;
-  GL(dl_platform) = NULL; /* Default to nothing known about the platform.  */
+  GLRO(dl_platform) = NULL; /* Default to nothing known about the platform.  */
 
   for (av = _dl_auxv; av->a_type != AT_NULL; set_seen (av++))
     switch (av->a_type)
@@ -119,7 +119,7 @@ _dl_sysdep_start (void **start_argptr,
 	phnum = av->a_un.a_val;
 	break;
       case AT_PAGESZ:
-	GL(dl_pagesize) = av->a_un.a_val;
+	GLRO(dl_pagesize) = av->a_un.a_val;
 	break;
       case AT_ENTRY:
 	user_entry = av->a_un.a_val;
@@ -146,23 +146,23 @@ _dl_sysdep_start (void **start_argptr,
 	INTUSE(__libc_enable_secure) = av->a_un.a_val;
 	break;
       case AT_PLATFORM:
-	GL(dl_platform) = av->a_un.a_ptr;
+	GLRO(dl_platform) = av->a_un.a_ptr;
 	break;
       case AT_HWCAP:
-	GL(dl_hwcap) = av->a_un.a_val;
+	GLRO(dl_hwcap) = av->a_un.a_val;
 	break;
       case AT_CLKTCK:
-	GL(dl_clktck) = av->a_un.a_val;
+	GLRO(dl_clktck) = av->a_un.a_val;
 	break;
       case AT_FPUCW:
-	GL(dl_fpu_control) = av->a_un.a_val;
+	GLRO(dl_fpu_control) = av->a_un.a_val;
 	break;
 #ifdef NEED_DL_SYSINFO
       case AT_SYSINFO:
 	new_sysinfo = av->a_un.a_val;
 	break;
       case AT_SYSINFO_EHDR:
-	GL(dl_sysinfo_dso) = av->a_un.a_ptr;
+	GLRO(dl_sysinfo_dso) = av->a_un.a_ptr;
 	break;
 #endif
 #ifdef DL_PLATFORM_AUXV
@@ -195,14 +195,14 @@ _dl_sysdep_start (void **start_argptr,
 #endif
 
 #ifndef HAVE_AUX_PAGESIZE
-  if (GL(dl_pagesize) == 0)
-    GL(dl_pagesize) = __getpagesize ();
+  if (GLRO(dl_pagesize) == 0)
+    GLRO(dl_pagesize) = __getpagesize ();
 #endif
 
 #if defined NEED_DL_SYSINFO
   /* Only set the sysinfo value if we also have the vsyscall DSO.  */
-  if (GL(dl_sysinfo_dso) != 0 && new_sysinfo)
-    GL(dl_sysinfo) = new_sysinfo;
+  if (GLRO(dl_sysinfo_dso) != 0 && new_sysinfo)
+    GLRO(dl_sysinfo) = new_sysinfo;
 #endif
 
 #ifdef DL_SYSDEP_INIT
@@ -214,8 +214,8 @@ _dl_sysdep_start (void **start_argptr,
 #endif
 
   /* Determine the length of the platform name.  */
-  if (GL(dl_platform) != NULL)
-    GL(dl_platformlen) = strlen (GL(dl_platform));
+  if (GLRO(dl_platform) != NULL)
+    GLRO(dl_platformlen) = strlen (GLRO(dl_platform));
 
   if (__sbrk (0) == &_end)
     /* The dynamic linker was run as a program, and so the initial break
@@ -223,7 +223,8 @@ _dl_sysdep_start (void **start_argptr,
        will consume the rest of this page, so tell the kernel to move the
        break up that far.  When the user program examines its break, it
        will see this new value and not clobber our data.  */
-    __sbrk (GL(dl_pagesize) - ((&_end - (void *) 0) & (GL(dl_pagesize) - 1)));
+    __sbrk (GLRO(dl_pagesize)
+	    - ((&_end - (void *) 0) & (GLRO(dl_pagesize) - 1)));
 
   /* If this is a SUID program we make sure that FDs 0, 1, and 2 are
      allocated.  If necessary we are doing it ourself.  If it is not
@@ -338,7 +339,7 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
 		      size_t *max_capstrlen)
 {
   /* Determine how many important bits are set.  */
-  unsigned long int masked = GL(dl_hwcap) & GL(dl_hwcap_mask);
+  unsigned long int masked = GLRO(dl_hwcap) & GLRO(dl_hwcap_mask);
   size_t cnt = platform != NULL;
   size_t n, m;
   size_t total;
diff --git a/sysdeps/generic/libc-start.c b/sysdeps/generic/libc-start.c
index 0708c91cfc..9edbf8e123 100644
--- a/sysdeps/generic/libc-start.c
+++ b/sysdeps/generic/libc-start.c
@@ -173,7 +173,7 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
 
   /* Call the initializer of the program, if any.  */
 #ifdef SHARED
-  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
+  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
     _dl_debug_printf ("\ninitialize program: %s\n\n", argv[0]);
 #endif
   if (init)
@@ -184,7 +184,7 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
 	     );
 
 #ifdef SHARED
-  if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
+  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
     _dl_debug_printf ("\ntransferring control: %s\n\n", argv[0]);
 #endif
 
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index d384e6d470..6ba13c4b01 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -1,5 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  i386 version.
-   Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1995-2002, 2003, 2004 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
@@ -129,7 +129,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 	{
 	  got[2] = (Elf32_Addr) &_dl_runtime_profile;
 
-	  if (_dl_name_match_p (GL(dl_profile), l))
+	  if (_dl_name_match_p (GLRO(dl_profile), l))
 	    /* This is the object we are looking for.  Say that we really
 	       want profiling and the timers are started.  */
 	    GL(dl_profile_map) = l;
@@ -351,9 +351,9 @@ _dl_start_user:\n\
 static inline void __attribute__ ((unused))
 dl_platform_init (void)
 {
-  if (GL(dl_platform) != NULL && *GL(dl_platform) == '\0')
+  if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0')
     /* Avoid an empty string which would disturb us.  */
-    GL(dl_platform) = NULL;
+    GLRO(dl_platform) = NULL;
 }
 
 static inline Elf32_Addr
@@ -507,7 +507,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
 	    break;
 	  if (__builtin_expect (sym->st_size > refsym->st_size, 0)
 	      || (__builtin_expect (sym->st_size < refsym->st_size, 0)
-		  && GL(dl_verbose)))
+		  && GLRO(dl_verbose)))
 	    {
 	      const char *strtab;
 
@@ -607,7 +607,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
 	    break;
 	  if (__builtin_expect (sym->st_size > refsym->st_size, 0)
 	      || (__builtin_expect (sym->st_size < refsym->st_size, 0)
-		  && GL(dl_verbose)))
+		  && GLRO(dl_verbose)))
 	    {
 	      const char *strtab;
 
diff --git a/sysdeps/i386/fpu/fclrexcpt.c b/sysdeps/i386/fpu/fclrexcpt.c
index 0e66d87e16..34ef070716 100644
--- a/sysdeps/i386/fpu/fclrexcpt.c
+++ b/sysdeps/i386/fpu/fclrexcpt.c
@@ -42,7 +42,7 @@ __feclearexcept (int excepts)
   __asm__ ("fldenv %0" : : "m" (*&temp));
 
   /* If the CPU supports SSE, we clear the MXCSR as well.  */
-  if ((GL(dl_hwcap) & HWCAP_I386_XMM) != 0)
+  if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
     {
       unsigned int xnew_exc;
 
diff --git a/sysdeps/i386/fpu/fedisblxcpt.c b/sysdeps/i386/fpu/fedisblxcpt.c
index ef3dd9a44c..6b0977fb36 100644
--- a/sysdeps/i386/fpu/fedisblxcpt.c
+++ b/sysdeps/i386/fpu/fedisblxcpt.c
@@ -1,5 +1,5 @@
 /* Disable floating-point exceptions.
-   Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@suse.de>, 1999.
 
@@ -39,7 +39,7 @@ fedisableexcept (int excepts)
   __asm__ ("fldcw %0" : : "m" (*&new_exc));
 
   /* If the CPU supports SSE we set the MXCSR as well.  */
-  if ((GL(dl_hwcap) & HWCAP_I386_XMM) != 0)
+  if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
     {
       unsigned int xnew_exc;
 
diff --git a/sysdeps/i386/fpu/feenablxcpt.c b/sysdeps/i386/fpu/feenablxcpt.c
index 8bf8bd9ec1..afd8dc774d 100644
--- a/sysdeps/i386/fpu/feenablxcpt.c
+++ b/sysdeps/i386/fpu/feenablxcpt.c
@@ -1,5 +1,5 @@
 /* Enable floating-point exceptions.
-   Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@suse.de>, 1999.
 
@@ -39,7 +39,7 @@ feenableexcept (int excepts)
   __asm__ ("fldcw %0" : : "m" (*&new_exc));
 
   /* If the CPU supports SSE we set the MXCSR as well.  */
-  if ((GL(dl_hwcap) & HWCAP_I386_XMM) != 0)
+  if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
     {
       unsigned int xnew_exc;
 
diff --git a/sysdeps/i386/fpu/feholdexcpt.c b/sysdeps/i386/fpu/feholdexcpt.c
index 2d6cc0d442..55096869a1 100644
--- a/sysdeps/i386/fpu/feholdexcpt.c
+++ b/sysdeps/i386/fpu/feholdexcpt.c
@@ -1,5 +1,5 @@
 /* Store current floating-point environment and clear exceptions.
-   Copyright (C) 1997, 1999, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -36,7 +36,7 @@ feholdexcept (fenv_t *envp)
   __asm__ ("fldcw %0" : : "m" (*&work));
 
   /* If the CPU supports SSE we set the MXCSR as well.  */
-  if ((GL(dl_hwcap) & HWCAP_I386_XMM) != 0)
+  if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
     {
       unsigned int xwork;
 
diff --git a/sysdeps/i386/fpu/fesetround.c b/sysdeps/i386/fpu/fesetround.c
index fe9889ffa0..2746f3ebf3 100644
--- a/sysdeps/i386/fpu/fesetround.c
+++ b/sysdeps/i386/fpu/fesetround.c
@@ -1,5 +1,5 @@
 /* Set current rounding direction.
-   Copyright (C) 1997, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -38,7 +38,7 @@ fesetround (int round)
   __asm__ ("fldcw %0" : : "m" (*&cw));
 
   /* If the CPU supports SSE we set the MXCSR as well.  */
-  if ((GL(dl_hwcap) & HWCAP_I386_XMM) != 0)
+  if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
     {
       unsigned int xcw;
 
diff --git a/sysdeps/i386/fpu/fsetexcptflg.c b/sysdeps/i386/fpu/fsetexcptflg.c
index d262738b68..03eeef359e 100644
--- a/sysdeps/i386/fpu/fsetexcptflg.c
+++ b/sysdeps/i386/fpu/fsetexcptflg.c
@@ -1,5 +1,5 @@
 /* Set floating-point environment exception handling.
-   Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
+   Copyright (C) 1997,99,2000,01, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -43,7 +43,7 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts)
   __asm__ ("fldenv %0" : : "m" (*&temp));
 
   /* If the CPU supports SSE, we set the MXCSR as well.  */
-  if ((GL(dl_hwcap) & HWCAP_I386_XMM) != 0)
+  if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
     {
       unsigned int xnew_exc;
 
@@ -57,7 +57,7 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts)
       /* Put the new data in effect.  */
       __asm__ ("ldmxcsr %0" : : "m" (*&xnew_exc));
     }
-  
+
   /* Success.  */
   return 0;
 }
diff --git a/sysdeps/i386/fpu/ftestexcept.c b/sysdeps/i386/fpu/ftestexcept.c
index f82b355352..9038e04c3b 100644
--- a/sysdeps/i386/fpu/ftestexcept.c
+++ b/sysdeps/i386/fpu/ftestexcept.c
@@ -1,5 +1,5 @@
 /* Test exception in current environment.
-   Copyright (C) 1997, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -33,7 +33,7 @@ fetestexcept (int excepts)
   __asm__ ("fnstsw %0" : "=a" (temp));
 
   /* If the CPU supports SSE we test the MXCSR as well.  */
-  if ((GL(dl_hwcap) & HWCAP_I386_XMM) != 0)
+  if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
     __asm__ ("stmxcsr %0" : "=m" (*&xtemp));
 
   return (temp | xtemp) & excepts & FE_ALL_EXCEPT;
diff --git a/sysdeps/i386/setfpucw.c b/sysdeps/i386/setfpucw.c
index 0a6af25ddf..1ca2d3cbd2 100644
--- a/sysdeps/i386/setfpucw.c
+++ b/sysdeps/i386/setfpucw.c
@@ -1,5 +1,5 @@
 /* Set the FPU control word for x86.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004 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
@@ -40,7 +40,7 @@ __setfpucw (fpu_control_t set)
   __asm__ ("fldcw %0" : : "m" (*&cw));
 
   /* If the CPU supports SSE, we set the MXCSR as well.  */
-  if ((GL(dl_hwcap) & HWCAP_I386_XMM) != 0)
+  if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
     {
       unsigned int xnew_exc;
 
diff --git a/sysdeps/ia64/dl-machine.h b/sysdeps/ia64/dl-machine.h
index ca47752c9e..fbf3f20287 100644
--- a/sysdeps/ia64/dl-machine.h
+++ b/sysdeps/ia64/dl-machine.h
@@ -123,7 +123,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 	doit = (Elf64_Addr) ((struct fdesc *) &_dl_runtime_resolve)->ip;
       else
 	{
-	  if (_dl_name_match_p (GL(dl_profile), l))
+	  if (_dl_name_match_p (GLRO(dl_profile), l))
 	    {
 	      /* This is the object we are looking for.  Say that we really
 		 want profiling and the timers are started.  */
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index d3bc83a011..e52893889d 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -1,5 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  m68k version.
-   Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1996-2001, 2002, 2003, 2004 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
@@ -85,7 +85,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 	{
 	  got[2] = (Elf32_Addr) &_dl_runtime_profile;
 
-	  if (_dl_name_match_p (GL(dl_profile), l))
+	  if (_dl_name_match_p (GLRO(dl_profile), l))
 	    {
 	      /* This is the object we are looking for.  Say that we really
 		 want profiling and the timers are started.  */
@@ -248,7 +248,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
 	       found.  */
 	    break;
 	  if (sym->st_size > refsym->st_size
-	      || (sym->st_size < refsym->st_size && GL(dl_verbose)))
+	      || (sym->st_size < refsym->st_size && GLRO(dl_verbose)))
 	    {
 	      const char *strtab;
 
diff --git a/sysdeps/powerpc/powerpc32/dl-machine.c b/sysdeps/powerpc/powerpc32/dl-machine.c
index 642cad48a2..0dce04088b 100644
--- a/sysdeps/powerpc/powerpc32/dl-machine.c
+++ b/sysdeps/powerpc/powerpc32/dl-machine.c
@@ -120,8 +120,8 @@ __elf_preferred_address(struct link_map *loader, size_t maplength,
   for (l = GL(dl_loaded); l; l = l->l_next)
     {
       ElfW(Addr) mapstart, mapend;
-      mapstart = l->l_map_start & ~(GL(dl_pagesize) - 1);
-      mapend = l->l_map_end | (GL(dl_pagesize) - 1);
+      mapstart = l->l_map_start & ~(GLRO(dl_pagesize) - 1);
+      mapend = l->l_map_end | (GLRO(dl_pagesize) - 1);
       assert (mapend > mapstart);
 
       /* Prefer gaps below the main executable, note that l ==
@@ -142,7 +142,7 @@ __elf_preferred_address(struct link_map *loader, size_t maplength,
     }
 
   high -= 0x10000; /* Allow some room between objects.  */
-  maplength = (maplength | (GL(dl_pagesize) - 1)) + 1;
+  maplength = (maplength | (GLRO(dl_pagesize) - 1)) + 1;
   if (high <= low || high - low < maplength )
     return 0;
   return high - maplength;  /* Both high and maplength are page-aligned.  */
@@ -240,7 +240,7 @@ __elf_machine_runtime_setup (struct link_map *map, int lazy, int profile)
 					 : _dl_runtime_resolve);
 	  Elf32_Word offset;
 
-	  if (profile && _dl_name_match_p (GL(dl_profile), map))
+	  if (profile && _dl_name_match_p (GLRO(dl_profile), map))
 	    /* This is the object we are looking for.  Say that we really
 	       want profiling and the timers are started.  */
 	    GL(dl_profile_map) = map;
@@ -499,7 +499,7 @@ __process_machine_rela (struct link_map *map,
 	   found.  */
 	return;
       if (sym->st_size > refsym->st_size
-	  || (GL(dl_verbose) && sym->st_size < refsym->st_size))
+	  || (GLRO(dl_verbose) && sym->st_size < refsym->st_size))
 	{
 	  const char *strtab;
 
diff --git a/sysdeps/powerpc/powerpc64/dl-machine.h b/sysdeps/powerpc/powerpc64/dl-machine.h
index 843737eb86..3edbadf6a4 100644
--- a/sysdeps/powerpc/powerpc64/dl-machine.h
+++ b/sysdeps/powerpc/powerpc64/dl-machine.h
@@ -1,6 +1,6 @@
 /* Machine-dependent ELF dynamic relocation inline functions.
    PowerPC64 version.
-   Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+   Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -416,7 +416,7 @@ elf_machine_runtime_setup (struct link_map *map, int lazy, int profile)
 
 	  resolve_fd = (Elf64_FuncDesc *) (profile ? _dl_profile_resolve
 					   : _dl_runtime_resolve);
-	  if (profile && _dl_name_match_p (GL(dl_profile), map))
+	  if (profile && _dl_name_match_p (GLRO(dl_profile), map))
 	    /* This is the object we are looking for.  Say that we really
 	       want profiling and the timers are started.  */
 	    GL(dl_profile_map) = map;
@@ -757,7 +757,8 @@ elf_machine_rela (struct link_map *map,
 	/* This can happen in trace mode when an object could not be found. */
         return;
       if (dont_expect (sym->st_size > refsym->st_size
-		       || (GL(dl_verbose) && sym->st_size < refsym->st_size)))
+		       || (GLRO(dl_verbose)
+			   && sym->st_size < refsym->st_size)))
 	{
           const char *strtab;
 
diff --git a/sysdeps/s390/s390-32/dl-machine.h b/sysdeps/s390/s390-32/dl-machine.h
index 7a7dfbebb3..52922a813b 100644
--- a/sysdeps/s390/s390-32/dl-machine.h
+++ b/sysdeps/s390/s390-32/dl-machine.h
@@ -1,5 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  S390 Version.
-   Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
    Contributed by Carl Pederson & Martin Schwidefsky.
    This file is part of the GNU C Library.
 
@@ -112,7 +112,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 	{
 	  got[2] = (Elf32_Addr) &_dl_runtime_profile;
 
-	  if (_dl_name_match_p (GL(dl_profile), l))
+	  if (_dl_name_match_p (GLRO(dl_profile), l))
 	    /* This is the object we are looking for.  Say that we really
 	       want profiling and the timers are started.  */
 	    GL(dl_profile_map) = l;
@@ -354,9 +354,9 @@ _dl_start_user:\n\
 static inline void __attribute__ ((unused))
 dl_platform_init (void)
 {
-  if (GL(dl_platform) != NULL && *GL(dl_platform) == '\0')
+  if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0')
     /* Avoid an empty string which would disturb us.  */
-    GL(dl_platform) = NULL;
+    GLRO(dl_platform) = NULL;
 }
 
 static inline Elf32_Addr
@@ -488,7 +488,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
 	    break;
 	  if (__builtin_expect (sym->st_size > refsym->st_size, 0)
 	      || (__builtin_expect (sym->st_size < refsym->st_size, 0)
-		  && __builtin_expect (GL(dl_verbose), 0)))
+		  && __builtin_expect (GLRO(dl_verbose), 0)))
 	    {
 	      const char *strtab;
 
diff --git a/sysdeps/s390/s390-64/dl-machine.h b/sysdeps/s390/s390-64/dl-machine.h
index c898c7f67a..82ece0be0f 100644
--- a/sysdeps/s390/s390-64/dl-machine.h
+++ b/sysdeps/s390/s390-64/dl-machine.h
@@ -1,6 +1,6 @@
 /* Machine-dependent ELF dynamic relocation inline functions.
    64 bit S/390 Version.
-   Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -105,7 +105,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 	{
 	  got[2] = (Elf64_Addr) &_dl_runtime_profile;
 
-	  if (_dl_name_match_p (GL(dl_profile), l))
+	  if (_dl_name_match_p (GLRO(dl_profile), l))
 	    /* This is the object we are looking for.  Say that we really
 	       want profiling and the timers are started.  */
 	    GL(dl_profile_map) = l;
@@ -322,9 +322,9 @@ _dl_start_user:\n\
 static inline void __attribute__ ((unused))
 dl_platform_init (void)
 {
-  if (GL(dl_platform) != NULL && *GL(dl_platform) == '\0')
+  if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0')
     /* Avoid an empty string which would disturb us.  */
-    GL(dl_platform) = NULL;
+    GLRO(dl_platform) = NULL;
 }
 
 static inline Elf64_Addr
@@ -455,7 +455,7 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
 	    break;
 	  if (__builtin_expect (sym->st_size > refsym->st_size, 0)
 	      || (__builtin_expect (sym->st_size < refsym->st_size, 0)
-		  && __builtin_expect (GL(dl_verbose), 0)))
+		  && __builtin_expect (GLRO(dl_verbose), 0)))
 	    {
 	      const char *strtab;
 
diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h
index c2a5026f5b..da631d2f54 100644
--- a/sysdeps/sparc/sparc32/dl-machine.h
+++ b/sysdeps/sparc/sparc32/dl-machine.h
@@ -42,7 +42,7 @@
 
 /* Use a different preload file when running in 32-bit emulation mode
    on a 64-bit host.  */
-#define LD_SO_PRELOAD ((GL(dl_hwcap) & HWCAP_SPARC_V9) \
+#define LD_SO_PRELOAD ((GLRO(dl_hwcap) & HWCAP_SPARC_V9) \
 		       ? "/etc/ld.so.preload32" \
 		       : "/etc/ld.so.preload")
 
@@ -58,9 +58,9 @@ elf_machine_matches_host (const Elf32_Ehdr *ehdr)
       /* XXX The following is wrong!  Dave Miller rejected to implement it
 	 correctly.  If this causes problems shoot *him*!  */
 #ifdef SHARED
-      return GL(dl_hwcap) & GL(dl_hwcap_mask) & HWCAP_SPARC_V9;
+      return GLRO(dl_hwcap) & GLRO(dl_hwcap_mask) & HWCAP_SPARC_V9;
 #else
-      return GL(dl_hwcap) & HWCAP_SPARC_V9;
+      return GLRO(dl_hwcap) & HWCAP_SPARC_V9;
 #endif
     }
   else
@@ -137,7 +137,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 	{
 	  rfunc = (Elf32_Addr) &_dl_runtime_profile;
 
-	  if (_dl_name_match_p (GL(dl_profile), l))
+	  if (_dl_name_match_p (GLRO(dl_profile), l))
 	    GL(dl_profile_map) = l;
 	}
 
@@ -166,7 +166,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 	  Elf32_Rela *relaend
 	    = (Elf32_Rela *) ((char *) rela
 			      + l->l_info[DT_PLTRELSZ]->d_un.d_val);
-	  do_flush = GL(dl_hwcap) & HWCAP_SPARC_FLUSH;
+	  do_flush = GLRO(dl_hwcap) & HWCAP_SPARC_FLUSH;
 
 	  /* prelink must ensure there are no R_SPARC_NONE relocs left
 	     in .rela.plt.  */
@@ -352,7 +352,7 @@ sparc_fixup_plt (const Elf32_Rela *reloc, Elf32_Addr *reloc_addr,
 #ifndef RTLD_BOOTSTRAP
   /* Note that we don't mask the hwcap here, as the flush is essential to
      functionality on those cpu's that implement it.  */
-  int do_flush = GL(dl_hwcap) & HWCAP_SPARC_FLUSH;
+  int do_flush = GLRO(dl_hwcap) & HWCAP_SPARC_FLUSH;
 #else
   /* Unfortunately, this is necessary, so that we can ensure
      ld.so will not execute corrupt PLT entry instructions. */
@@ -460,7 +460,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
 # if defined USE_TLS && !defined RTLD_BOOTSTRAP
 	  sym_map = RESOLVE_MAP (&sym, version, r_type);
 	  value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
-# else	  
+# else
 	  value = RESOLVE (&sym, version, r_type);
 	  if (sym)
 	    value += sym->st_value;
@@ -480,7 +480,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
 	       found.  */
 	    break;
 	  if (sym->st_size > refsym->st_size
-	      || (GL(dl_verbose) && sym->st_size < refsym->st_size))
+	      || (GLRO(dl_verbose) && sym->st_size < refsym->st_size))
 	    {
 	      const char *strtab;
 
diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h
index ff7ea8aa41..474aa0e6e6 100644
--- a/sysdeps/sparc/sparc64/dl-machine.h
+++ b/sysdeps/sparc/sparc64/dl-machine.h
@@ -284,7 +284,7 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
 	       found.  */
 	    break;
 	  if (sym->st_size > refsym->st_size
-	      || (GL(dl_verbose) && sym->st_size < refsym->st_size))
+	      || (GLRO(dl_verbose) && sym->st_size < refsym->st_size))
 	    {
 	      const char *strtab;
 
@@ -498,7 +498,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 	{
 	  res0_addr = (Elf64_Addr) &_dl_runtime_profile_0;
 	  res1_addr = (Elf64_Addr) &_dl_runtime_profile_1;
-	  if (_dl_name_match_p (GL(dl_profile), l))
+	  if (_dl_name_match_p (GLRO(dl_profile), l))
 	    GL(dl_profile_map) = l;
 	}
 
diff --git a/sysdeps/unix/sysv/linux/dl-execstack.c b/sysdeps/unix/sysv/linux/dl-execstack.c
index 48512ede7d..d3b048192c 100644
--- a/sysdeps/unix/sysv/linux/dl-execstack.c
+++ b/sysdeps/unix/sysv/linux/dl-execstack.c
@@ -31,7 +31,8 @@ internal_function
 _dl_make_stack_executable (void **stack_endp)
 {
   /* This gives us the highest/lowest page that needs to be changed.  */
-  uintptr_t page = (uintptr_t) __libc_stack_end & -(intptr_t) GL(dl_pagesize);
+  uintptr_t page = ((uintptr_t) __libc_stack_end
+		    & -(intptr_t) GLRO(dl_pagesize));
 
   /* Challenge the caller.  */
   if (__builtin_expect (*stack_endp != __libc_stack_end, 0))
@@ -46,7 +47,7 @@ _dl_make_stack_executable (void **stack_endp)
   if (! no_growsdown)
 #  endif
     {
-      if (__builtin_expect (__mprotect ((void *) page, GL(dl_pagesize),
+      if (__builtin_expect (__mprotect ((void *) page, GLRO(dl_pagesize),
 					PROT_READ|PROT_WRITE|PROT_EXEC
 					|PROT_GROWSDOWN) == 0, 1))
 	goto return_success;
@@ -67,8 +68,8 @@ _dl_make_stack_executable (void **stack_endp)
      so as to have extended the GROWSDOWN mapping to lower pages.  */
 
 # if __ASSUME_PROT_GROWSUPDOWN == 0
-  size_t size = GL(dl_pagesize) * 8;
-  page = page + GL(dl_pagesize) - size;
+  size_t size = GLRO(dl_pagesize) * 8;
+  page = page + GLRO(dl_pagesize) - size;
   while (1)
     {
       if (__mprotect ((void *) page, size,
@@ -80,7 +81,7 @@ _dl_make_stack_executable (void **stack_endp)
 	  if (errno != ENOMEM)	/* Unexpected failure mode.  */
 	    return errno;
 
-	  if (size == GL(dl_pagesize))
+	  if (size == GLRO(dl_pagesize))
 	    /* We just tried to mprotect the top hole page and failed.
 	       We are done.  */
 	    break;
@@ -101,7 +102,7 @@ _dl_make_stack_executable (void **stack_endp)
   if (! no_growsup)
 #  endif
     {
-      if (__mprotect ((void *) page, GL(dl_pagesize),
+      if (__mprotect ((void *) page, GLRO(dl_pagesize),
 		      PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSUP) == 0)
 	goto return_success;
 #  if __ASSUME_PROT_GROWSUPDOWN == 0
@@ -121,7 +122,7 @@ _dl_make_stack_executable (void **stack_endp)
      so as to have extended the GROWSUP mapping to higher pages.  */
 
 # if __ASSUME_PROT_GROWSUPDOWN == 0
-  size_t size = GL(dl_pagesize) * 8;
+  size_t size = GLRO(dl_pagesize) * 8;
   while (1)
     {
       if (__mprotect ((void *) page, size,
@@ -133,7 +134,7 @@ _dl_make_stack_executable (void **stack_endp)
 	  if (errno != ENOMEM)	/* Unexpected failure mode.  */
 	    return errno;
 
-	  if (size == GL(dl_pagesize))
+	  if (size == GLRO(dl_pagesize))
 	    /* We just tried to mprotect the lowest hole page and failed.
 	       We are done.  */
 	    break;
diff --git a/sysdeps/unix/sysv/linux/dl-librecon.h b/sysdeps/unix/sysv/linux/dl-librecon.h
index 97de79640d..db46b98fb7 100644
--- a/sysdeps/unix/sysv/linux/dl-librecon.h
+++ b/sysdeps/unix/sysv/linux/dl-librecon.h
@@ -1,5 +1,5 @@
 /* Optional code to distinguish library flavours.
-   Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2001.
 
@@ -40,7 +40,7 @@ _dl_osversion_init (char *assume_kernel)
 	break;
     }
   if (osversion)
-    GL(dl_osversion) = osversion;
+    GLRO(dl_osversion) = osversion;
 }
 
 /* Recognizing extra environment variables.  */
diff --git a/sysdeps/unix/sysv/linux/dl-origin.c b/sysdeps/unix/sysv/linux/dl-origin.c
index 3824681fa7..690492093d 100644
--- a/sysdeps/unix/sysv/linux/dl-origin.c
+++ b/sysdeps/unix/sysv/linux/dl-origin.c
@@ -1,5 +1,5 @@
 /* Find path of executable.
-   Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -59,15 +59,15 @@ _dl_get_origin (void)
       result = (char *) -1;
       /* We use the environment variable LD_ORIGIN_PATH.  If it is set make
 	 a copy and strip out trailing slashes.  */
-      if (GL(dl_origin_path) != NULL)
+      if (GLRO(dl_origin_path) != NULL)
 	{
-	  size_t len = strlen (GL(dl_origin_path));
+	  size_t len = strlen (GLRO(dl_origin_path));
 	  result = (char *) malloc (len + 1);
 	  if (result == NULL)
 	    result = (char *) -1;
 	  else
 	    {
-	      char *cp = __mempcpy (result, GL(dl_origin_path), len);
+	      char *cp = __mempcpy (result, GLRO(dl_origin_path), len);
 	      while (cp > result + 1 && cp[-1] == '/')
 		--cp;
 	      *cp = '\0';
diff --git a/sysdeps/unix/sysv/linux/dl-osinfo.h b/sysdeps/unix/sysv/linux/dl-osinfo.h
index b60a202ff0..5abc3c47c8 100644
--- a/sysdeps/unix/sysv/linux/dl-osinfo.h
+++ b/sysdeps/unix/sysv/linux/dl-osinfo.h
@@ -1,5 +1,5 @@
 /* Operating system specific code  for generic dynamic loader functions.
-   Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2002, 2004 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
@@ -104,6 +104,6 @@ dl_fatal (const char *str)
 	  /* Not sufficent.  */						      \
 	  FATAL ("FATAL: kernel too old\n");				      \
 									      \
-	GL(dl_osversion) = version;					      \
+	GLRO(dl_osversion) = version;					      \
       }									      \
   } while (0)
diff --git a/sysdeps/unix/sysv/linux/getclktck.c b/sysdeps/unix/sysv/linux/getclktck.c
index dc8ec9b50b..f9fece32ff 100644
--- a/sysdeps/unix/sysv/linux/getclktck.c
+++ b/sysdeps/unix/sysv/linux/getclktck.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2004 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
@@ -28,5 +28,5 @@
 int
 __getclktck ()
 {
-  return GL(dl_clktck) ?: SYSTEM_CLK_TCK;
+  return GLRO(dl_clktck) ?: SYSTEM_CLK_TCK;
 }
diff --git a/sysdeps/unix/sysv/linux/getpagesize.c b/sysdeps/unix/sysv/linux/getpagesize.c
index 4f73e034eb..6d03b3bbf2 100644
--- a/sysdeps/unix/sysv/linux/getpagesize.c
+++ b/sysdeps/unix/sysv/linux/getpagesize.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,1992,1995-1997,2000,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1995-1997,2000,2002,2004
+   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
@@ -25,8 +26,8 @@
 int
 __getpagesize ()
 {
-  if (GL(dl_pagesize) != 0)
-    return GL(dl_pagesize);
+  if (GLRO(dl_pagesize) != 0)
+    return GLRO(dl_pagesize);
 
 #ifdef	EXEC_PAGESIZE
   return EXEC_PAGESIZE;
diff --git a/sysdeps/unix/sysv/linux/i386/dl-librecon.h b/sysdeps/unix/sysv/linux/i386/dl-librecon.h
index f5a9f65166..5e41977dde 100644
--- a/sysdeps/unix/sysv/linux/i386/dl-librecon.h
+++ b/sysdeps/unix/sysv/linux/i386/dl-librecon.h
@@ -1,5 +1,5 @@
 /* Optional code to distinguish library flavours.
-   Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -51,7 +51,7 @@
 #define EXTRA_LD_ENVVARS \
   case 15:								      \
     if (memcmp (envline, "LIBRARY_VERSION", 15) == 0)			      \
-      GL(dl_correct_cache_id) = envline[16] == '5' ? 2 : 3;		      \
+      GLRO(dl_correct_cache_id) = envline[16] == '5' ? 2 : 3;		      \
     break;								      \
 
 /* Extra unsecure variables.  The names are all stuffed in a single
diff --git a/sysdeps/unix/sysv/linux/i386/sigaction.c b/sysdeps/unix/sysv/linux/i386/sigaction.c
index 8971a86a92..9cb5b6e340 100644
--- a/sysdeps/unix/sysv/linux/i386/sigaction.c
+++ b/sysdeps/unix/sysv/linux/i386/sigaction.c
@@ -1,5 +1,5 @@
 /* POSIX.1 `sigaction' call for Linux/i386.
-   Copyright (C) 1991,95,96,97,98,99,2000,02,03 Free Software Foundation, Inc.
+   Copyright (C) 1991,1995-2000,02,03, 2004 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
@@ -88,7 +88,7 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
 	  kact.sa_flags = act->sa_flags;
 	  memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t));
 
-	  if (GL(dl_sysinfo_dso) == NULL)
+	  if (GLRO(dl_sysinfo_dso) == NULL)
 	    {
 	      kact.sa_flags |= SA_RESTORER;
 
diff --git a/sysdeps/unix/sysv/linux/init-first.c b/sysdeps/unix/sysv/linux/init-first.c
index 7417fd6d0b..f00271255d 100644
--- a/sysdeps/unix/sysv/linux/init-first.c
+++ b/sysdeps/unix/sysv/linux/init-first.c
@@ -1,5 +1,5 @@
 /* Initialization code run first thing by the ELF startup code.  Linux version.
-   Copyright (C) 1995-1999,2000,01,02,03 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999,2000,01,02,03,2004 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
@@ -58,7 +58,7 @@ init (int argc, char **argv, char **envp)
 	 kernel would use a different value.  (In a static program we
 	 don't have this information.)  */
 #ifdef SHARED
-      if (__fpu_control != GL(dl_fpu_control))
+      if (__fpu_control != GLRO(dl_fpu_control))
 #endif
 	__setfpucw (__fpu_control);
     }
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
index 760e9b5534..d3e9b49cfb 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
@@ -72,7 +72,7 @@ ENTRY(__getcontext)
 	mfcr	r0
 	stw	r0,_UC_GREGS+(PT_CCR*4)(r3)
 
-	/* Set the return value of getcontext to "success".  R3 is the only 
+	/* Set the return value of getcontext to "success".  R3 is the only
 	   register whose value is not preserved in the saved context.  */
 	li	r0,0
 	stw	r0,_UC_GREGS+(PT_R3*4)(r3)
@@ -121,11 +121,11 @@ ENTRY(__getcontext)
 	mflr    r8
 	bl      _GLOBAL_OFFSET_TABLE_@local-4
 	mflr    r7
-#ifdef SHARED	
-	lwz     r7,_rtld_global@got(r7)
+#ifdef SHARED
+	lwz     r7,_rtld_global_ro@got(r7)
 	mtlr    r8
 	lwz     r7,RTLD_GLOBAL_DL_HWCAP_OFFSET(r7)
-#else	
+#else
 	lwz     r7,_dl_hwcap@got(r7)
 	mtlr    r8
 	lwz     r7,0(r7)
@@ -136,95 +136,95 @@ ENTRY(__getcontext)
 #endif
 	andis.	r7,r7,(PPC_FEATURE_HAS_ALTIVEC >> 16)
 	beq	L(no_vec)
-  
+
 	la	r10,(_UC_VREGS)(r3)
 	la	r9,(_UC_VREGS+16)(r3)
 
-	stvx  v0,0,r10  
+	stvx  v0,0,r10
 	stvx  v1,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v2,0,r10  
+	stvx  v2,0,r10
 	stvx  v3,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v4,0,r10  
+	stvx  v4,0,r10
 	stvx  v5,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v6,0,r10  
+	stvx  v6,0,r10
 	stvx  v7,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v8,0,r10  
+	stvx  v8,0,r10
 	stvx  v9,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v10,0,r10  
+	stvx  v10,0,r10
 	stvx  v11,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v12,0,r10  
+	stvx  v12,0,r10
 	stvx  v13,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v14,0,r10  
+	stvx  v14,0,r10
 	stvx  v15,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v16,0,r10  
+	stvx  v16,0,r10
 	stvx  v17,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v18,0,r10  
+	stvx  v18,0,r10
 	stvx  v11,0,r9
 	addi  r19,r10,32
 	addi  r9,r9,32
 
-	stvx  v20,0,r10  
+	stvx  v20,0,r10
 	stvx  v21,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v22,0,r10  
+	stvx  v22,0,r10
 	stvx  v23,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v24,0,r10  
+	stvx  v24,0,r10
 	stvx  v25,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v26,0,r10  
+	stvx  v26,0,r10
 	stvx  v27,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v28,0,r10  
+	stvx  v28,0,r10
 	stvx  v29,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v30,0,r10  
+	stvx  v30,0,r10
 	stvx  v31,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v10,0,r10  
+	stvx  v10,0,r10
 	stvx  v11,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
-  
+
 	mfvscr	v0
 	mfspr	r0,VRSAVE
 	stvx	v0,0,r10
@@ -301,7 +301,7 @@ ENTRY(__novec_getcontext)
 	mfcr	r0
 	stw	r0,_UC_GREGS+(PT_CCR*4)(r3)
 
-	/* Set the return value of getcontext to "success".  R3 is the only 
+	/* Set the return value of getcontext to "success".  R3 is the only
 	   register whose value is not preserved in the saved context.  */
 	li	r0,0
 	stw	r0,_UC_GREGS+(PT_R3*4)(r3)
@@ -345,7 +345,7 @@ ENTRY(__novec_getcontext)
 	stfd	fp30,_UC_FREGS+(30*8)(r3)
 	stfd	fp31,_UC_FREGS+(31*8)(r3)
 	stfd	fp0,_UC_FREGS+(32*8)(r3)
-	
+
 	addi	r5,r3,_UC_SIGMASK - _UC_REG_SPACE
 	li	r4,0
 	li	r3,SIG_BLOCK
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
index 11f488a63b..4c92dd7583 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
@@ -75,7 +75,7 @@ ENTRY(__swapcontext)
 	mfcr	r0
 	stw	r0,_UC_GREGS+(PT_CCR*4)(r3)
 
-	/* Set the return value of swapcontext to "success".  R3 is the only 
+	/* Set the return value of swapcontext to "success".  R3 is the only
 	   register whose value is not preserved in the saved context.  */
 	li	r0,0
 	stw	r0,_UC_GREGS+(PT_R3*4)(r3)
@@ -123,11 +123,11 @@ ENTRY(__swapcontext)
 	mflr    r8
 	bl      _GLOBAL_OFFSET_TABLE_@local-4
 	mflr    r7
-#ifdef SHARED	
-	lwz     r7,_rtld_global@got(r7)
+#ifdef SHARED
+	lwz     r7,_rtld_global_ro@got(r7)
 	mtlr    r8
 	lwz     r7,RTLD_GLOBAL_DL_HWCAP_OFFSET(r7)
-#else	
+#else
 	lwz     r7,_dl_hwcap@got(r7)
 	mtlr    r8
 	lwz     r7,0(r7)
@@ -138,95 +138,95 @@ ENTRY(__swapcontext)
 #endif
 	andis.	r7,r7,(PPC_FEATURE_HAS_ALTIVEC >> 16)
 	beq	L(no_vec)
-  
+
 	la	r10,(_UC_VREGS)(r3)
 	la	r9,(_UC_VREGS+16)(r3)
 
-	stvx  v0,0,r10  
+	stvx  v0,0,r10
 	stvx  v1,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v2,0,r10  
+	stvx  v2,0,r10
 	stvx  v3,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v4,0,r10  
+	stvx  v4,0,r10
 	stvx  v5,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v6,0,r10  
+	stvx  v6,0,r10
 	stvx  v7,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v8,0,r10  
+	stvx  v8,0,r10
 	stvx  v9,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v10,0,r10  
+	stvx  v10,0,r10
 	stvx  v11,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v12,0,r10  
+	stvx  v12,0,r10
 	stvx  v13,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v14,0,r10  
+	stvx  v14,0,r10
 	stvx  v15,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v16,0,r10  
+	stvx  v16,0,r10
 	stvx  v17,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v18,0,r10  
+	stvx  v18,0,r10
 	stvx  v11,0,r9
 	addi  r19,r10,32
 	addi  r9,r9,32
 
-	stvx  v20,0,r10  
+	stvx  v20,0,r10
 	stvx  v21,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v22,0,r10  
+	stvx  v22,0,r10
 	stvx  v23,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v24,0,r10  
+	stvx  v24,0,r10
 	stvx  v25,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v26,0,r10  
+	stvx  v26,0,r10
 	stvx  v27,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v28,0,r10  
+	stvx  v28,0,r10
 	stvx  v29,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v30,0,r10  
+	stvx  v30,0,r10
 	stvx  v31,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	stvx  v10,0,r10  
+	stvx  v10,0,r10
 	stvx  v11,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
-  
+
 	mfvscr	v0
 	mfspr	r0,VRSAVE
 	stvx	v0,0,r10
@@ -260,16 +260,16 @@ L(no_vec):
 	lwz	r0,_UC_GREGS+(PT_MSR*4)(r31)
 	cmpwi	r0,0
 	bne	L(do_sigret)
-	
+
 #ifdef PIC
 	mflr    r8
 	bl      _GLOBAL_OFFSET_TABLE_@local-4
 	mflr    r7
-#ifdef SHARED	
-	lwz     r7,_rtld_global@got(r7)
+#ifdef SHARED
+	lwz     r7,_rtld_global_ro@got(r7)
 	mtlr    r8
 	lwz     r7,RTLD_GLOBAL_DL_HWCAP_OFFSET(r7)
-#else	
+#else
 	lwz     r7,_dl_hwcap@got(r7)
 	mtlr    r8
 	lwz     r7,0(r7)
@@ -281,100 +281,100 @@ L(no_vec):
 	andis.	r7,r7,(PPC_FEATURE_HAS_ALTIVEC >> 16)
 	la	r10,(_UC_VREGS)(r31)
 	beq	L(has_no_vec)
-	
+
 	lwz   r0,(32*16)(r10)
 	li    r9,(32*16)
 	cmpwi r0,0
 	mtspr VRSAVE,r0
-	beq   L(has_no_vec)  
+	beq   L(has_no_vec)
 
 	lvx   v19,r9,r10
 	la    r9,(16)(r10)
 
-	lvx   v0,0,r10  
+	lvx   v0,0,r10
 	lvx   v1,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
 	mtvscr  v19
-	lvx   v2,0,r10  
+	lvx   v2,0,r10
 	lvx   v3,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	lvx   v4,0,r10  
+	lvx   v4,0,r10
 	lvx   v5,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	lvx   v6,0,r10  
+	lvx   v6,0,r10
 	lvx   v7,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	lvx   v8,0,r10  
+	lvx   v8,0,r10
 	lvx   v9,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	lvx   v10,0,r10  
+	lvx   v10,0,r10
 	lvx   v11,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	lvx   v12,0,r10  
+	lvx   v12,0,r10
 	lvx   v13,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	lvx   v14,0,r10  
+	lvx   v14,0,r10
 	lvx   v15,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	lvx   v16,0,r10  
+	lvx   v16,0,r10
 	lvx   v17,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	lvx   v18,0,r10  
+	lvx   v18,0,r10
 	lvx   v11,0,r9
 	addi  r19,r10,32
 	addi  r9,r9,32
 
-	lvx   v20,0,r10  
+	lvx   v20,0,r10
 	lvx   v21,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	lvx   v22,0,r10  
+	lvx   v22,0,r10
 	lvx   v23,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	lvx   v24,0,r10  
+	lvx   v24,0,r10
 	lvx   v25,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	lvx   v26,0,r10  
+	lvx   v26,0,r10
 	lvx   v27,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	lvx   v28,0,r10  
+	lvx   v28,0,r10
 	lvx   v29,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	lvx   v30,0,r10  
+	lvx   v30,0,r10
 	lvx   v31,0,r9
 	addi  r10,r10,32
 	addi  r9,r9,32
 
-	lvx   v10,0,r10  
+	lvx   v10,0,r10
 	lvx   v11,0,r9
-	
+
 L(has_no_vec):
 	/* Restore the floating-point registers */
 	lfd	fp31,_UC_FREGS+(32*8)(r31)
@@ -522,7 +522,7 @@ ENTRY(__novec_swapcontext)
 	mfcr	r0
 	stw	r0,_UC_GREGS+(PT_CCR*4)(r3)
 
-	/* Set the return value of swapcontext to "success".  R3 is the only 
+	/* Set the return value of swapcontext to "success".  R3 is the only
 	   register whose value is not preserved in the saved context.  */
 	li	r0,0
 	stw	r0,_UC_GREGS+(PT_R3*4)(r3)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
index 279a36d68d..c950316b2f 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
@@ -73,12 +73,12 @@ ENTRY(__novec_getcontext)
   std  r0,(SIGCONTEXT_GP_REGS+(PT_XER*8))(r3)
   mfcr  r0
   std  r0,(SIGCONTEXT_GP_REGS+(PT_CCR*8))(r3)
-  
-  /* Set the return value of swapcontext to "success".  R3 is the only 
+
+  /* Set the return value of swapcontext to "success".  R3 is the only
      register whose value is not preserved in the saved context.  */
   li   r0,0
   std  r0,(SIGCONTEXT_GP_REGS+(PT_R3*8))(r3)
-  
+
   /* Zero fill fields that can't be set in user state or are unused.  */
   std  r0,(SIGCONTEXT_GP_REGS+(PT_MSR*8))(r3)
   std  r0,(SIGCONTEXT_GP_REGS+(34*8))(r3)
@@ -87,14 +87,14 @@ ENTRY(__novec_getcontext)
   std  r0,(SIGCONTEXT_GP_REGS+(41*8))(r3)
   std  r0,(SIGCONTEXT_GP_REGS+(42*8))(r3)
   std  r0,(SIGCONTEXT_GP_REGS+(PT_RESULT*8))(r3)
-  
-  /* Set the PT_REGS pointer to the address of sigcontext's gp_regs 
-     field.  Struct pt_regs and elf_gregset_t are the same thing.  
+
+  /* Set the PT_REGS pointer to the address of sigcontext's gp_regs
+     field.  Struct pt_regs and elf_gregset_t are the same thing.
      We kept the regs field for backwards compatibility with
      libraries built before we extended sigcontext.  */
   addi r0,r3,SIGCONTEXT_GP_REGS
   std  r0,SIGCONTEXT_PT_REGS(r3)
-  
+
   stfd  fp0,(SIGCONTEXT_FP_REGS+(PT_R0*8))(r3)
   stfd  fp1,(SIGCONTEXT_FP_REGS+(PT_R1*8))(r3)
   stfd  fp2,(SIGCONTEXT_FP_REGS+(PT_R2*8))(r3)
@@ -145,8 +145,8 @@ ENTRY(__novec_getcontext)
   nop
   li   r3,-1
 #endif
-  
-  ld    r0,128+FRAME_LR_SAVE(r1)  
+
+  ld    r0,128+FRAME_LR_SAVE(r1)
   addi  r1,r1,128
   mtlr  r0
   blr
@@ -159,10 +159,10 @@ compat_symbol (libc, __novec_getcontext, getcontext, GLIBC_2_3)
 	.section	".toc","aw"
 .LC__dl_hwcap:
 #ifdef SHARED
-	.tc _rtld_global[TC],_rtld_global
+	.tc _rtld_global_ro[TC],_rtld_global_ro
 #else
 	.tc _dl_hwcap[TC],_dl_hwcap
-#endif	
+#endif
 	.section ".text"
 
 ENTRY(__getcontext)
@@ -209,12 +209,12 @@ ENTRY(__getcontext)
   std  r0,(SIGCONTEXT_GP_REGS+(PT_XER*8))(r3)
   mfcr  r0
   std  r0,(SIGCONTEXT_GP_REGS+(PT_CCR*8))(r3)
-  
-  /* Set the return value of swapcontext to "success".  R3 is the only 
+
+  /* Set the return value of swapcontext to "success".  R3 is the only
      register whose value is not preserved in the saved context.  */
   li   r0,0
   std  r0,(SIGCONTEXT_GP_REGS+(PT_R3*8))(r3)
-  
+
   /* Zero fill fields that can't be set in user state or are unused.  */
   std  r0,(SIGCONTEXT_GP_REGS+(PT_MSR*8))(r3)
   std  r0,(SIGCONTEXT_GP_REGS+(34*8))(r3)
@@ -223,14 +223,14 @@ ENTRY(__getcontext)
   std  r0,(SIGCONTEXT_GP_REGS+(41*8))(r3)
   std  r0,(SIGCONTEXT_GP_REGS+(42*8))(r3)
   std  r0,(SIGCONTEXT_GP_REGS+(PT_RESULT*8))(r3)
-  
-  /* Set the PT_REGS pointer to the address of sigcontext's gp_regs 
-     field.  Struct pt_regs and elf_gregset_t are the same thing.  
+
+  /* Set the PT_REGS pointer to the address of sigcontext's gp_regs
+     field.  Struct pt_regs and elf_gregset_t are the same thing.
      We kept the regs field for backwards compatibility with
      libraries built before we extended sigcontext.  */
   addi r0,r3,SIGCONTEXT_GP_REGS
   std  r0,SIGCONTEXT_PT_REGS(r3)
-  
+
   stfd  fp0,(SIGCONTEXT_FP_REGS+(PT_R0*8))(r3)
   stfd  fp1,(SIGCONTEXT_FP_REGS+(PT_R1*8))(r3)
   stfd  fp2,(SIGCONTEXT_FP_REGS+(PT_R2*8))(r3)
@@ -265,120 +265,120 @@ ENTRY(__getcontext)
   stfd  fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r3)
   stfd  fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r3)
   stfd  fp0,(SIGCONTEXT_FP_REGS+(32*8))(r3)
-  
+
   ld    r5,.LC__dl_hwcap@toc(r2)
   li    r10,0
-#ifdef SHARED  
+#ifdef SHARED
 /* Load _rtld-global._dl_hwcap.  */
-  ld    r5,RTLD_GLOBAL_DL_HWCAP_OFFSET(r5) 
-#else  
+  ld    r5,RTLD_GLOBAL_DL_HWCAP_OFFSET(r5)
+#else
   ld    r5,0(r5) /* Load extern _dl_hwcap.  */
 #endif
   andis.  r5,r5,(PPC_FEATURE_HAS_ALTIVEC >> 16)
   beq   L(has_no_vec)
-  
+
   la    r10,(SIGCONTEXT_V_RESERVE+8)(r3)
   la    r9,(SIGCONTEXT_V_RESERVE+24)(r3)
   clrrdi  r10,r10,4
   clrrdi  r9,r9,4
-  
-  stvx  v0,0,r10  
+
+  stvx  v0,0,r10
   stvx  v1,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v2,0,r10  
+
+  stvx  v2,0,r10
   stvx  v3,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v4,0,r10  
+
+  stvx  v4,0,r10
   stvx  v5,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v6,0,r10  
+
+  stvx  v6,0,r10
   stvx  v7,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v8,0,r10  
+
+  stvx  v8,0,r10
   stvx  v9,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v10,0,r10  
+
+  stvx  v10,0,r10
   stvx  v11,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v12,0,r10  
+
+  stvx  v12,0,r10
   stvx  v13,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v14,0,r10  
+
+  stvx  v14,0,r10
   stvx  v15,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v16,0,r10  
+
+  stvx  v16,0,r10
   stvx  v17,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v18,0,r10  
+
+  stvx  v18,0,r10
   stvx  v11,0,r9
   addi  r19,r10,32
   addi  r9,r9,32
-  
-  stvx  v20,0,r10  
+
+  stvx  v20,0,r10
   stvx  v21,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v22,0,r10  
+
+  stvx  v22,0,r10
   stvx  v23,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v24,0,r10  
+
+  stvx  v24,0,r10
   stvx  v25,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v26,0,r10  
+
+  stvx  v26,0,r10
   stvx  v27,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v28,0,r10  
+
+  stvx  v28,0,r10
   stvx  v29,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v30,0,r10  
+
+  stvx  v30,0,r10
   stvx  v31,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v10,0,r10  
+
+  stvx  v10,0,r10
   stvx  v11,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
+
   mfvscr  v0
   mfspr r0,VRSAVE
   stvx  v0,0,r10
   stw   r0,0(9)
-  
+
 L(has_no_vec):
-/* 
+/*
    Store either a NULL or a quadword aligned pointer to the Vector register
    array into *v_regs.
 */
   std   r10,(SIGCONTEXT_V_REGS_PTR)(r3)
-  
+
   addi  r5,r3,UCONTEXT_SIGMASK
   li  r4,0
   li  r3,SIG_BLOCK
@@ -394,12 +394,11 @@ L(has_no_vec):
   nop
   li   r3,-1
 #endif
-  
-  ld    r0,128+FRAME_LR_SAVE(r1)  
+
+  ld    r0,128+FRAME_LR_SAVE(r1)
   addi  r1,r1,128
   mtlr  r0
   blr
 PSEUDO_END(__getcontext)
 
 versioned_symbol (libc, __getcontext, getcontext, GLIBC_2_3_4)
-
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
index ab6a6254f9..8e2cc71b0a 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
@@ -73,12 +73,12 @@ ENTRY(__novec_swapcontext)
   std  r0,(SIGCONTEXT_GP_REGS+(PT_XER*8))(r3)
   mfcr  r0
   std  r0,(SIGCONTEXT_GP_REGS+(PT_CCR*8))(r3)
-  
-  /* Set the return value of swapcontext to "success".  R3 is the only 
+
+  /* Set the return value of swapcontext to "success".  R3 is the only
      register whose value is not preserved in the saved context.  */
   li   r0,0
   std  r0,(SIGCONTEXT_GP_REGS+(PT_R3*8))(r3)
-  
+
   /* Zero fill fields that can't be set in user state or are unused.  */
   std  r0,(SIGCONTEXT_GP_REGS+(PT_MSR*8))(r3)
   std  r0,(SIGCONTEXT_GP_REGS+(34*8))(r3)
@@ -87,14 +87,14 @@ ENTRY(__novec_swapcontext)
   std  r0,(SIGCONTEXT_GP_REGS+(41*8))(r3)
   std  r0,(SIGCONTEXT_GP_REGS+(42*8))(r3)
   std  r0,(SIGCONTEXT_GP_REGS+(PT_RESULT*8))(r3)
-  
-  /* Set the PT_REGS pointer to the address of sigcontext gp_regs 
-     field.  Struct pt_regs and elf_gregset_t are the same thing.  
+
+  /* Set the PT_REGS pointer to the address of sigcontext gp_regs
+     field.  Struct pt_regs and elf_gregset_t are the same thing.
      We kept the regs field for backwards compatibility with
      libraries built before we extended sigcontext.  */
   addi r0,r3,SIGCONTEXT_GP_REGS
   std  r0,SIGCONTEXT_PT_REGS(r3)
-  
+
   stfd  fp0,(SIGCONTEXT_FP_REGS+(PT_R0*8))(r3)
   stfd  fp1,(SIGCONTEXT_FP_REGS+(PT_R1*8))(r3)
   stfd  fp2,(SIGCONTEXT_FP_REGS+(PT_R2*8))(r3)
@@ -154,41 +154,41 @@ ENTRY(__novec_swapcontext)
   bne	  L(nv_do_sigret)
 
   lfd  fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31)
-  lfd  fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31)	
+  lfd  fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31)
   lfd  fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31)
   mtfsf  0xff,fp0
-  lfd  fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31)	
+  lfd  fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31)
   lfd  fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31)
-  lfd  fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31)	
+  lfd  fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31)
   lfd  fp26,(SIGCONTEXT_FP_REGS+(PT_R26*8))(r31)
-  lfd  fp25,(SIGCONTEXT_FP_REGS+(PT_R25*8))(r31)	
+  lfd  fp25,(SIGCONTEXT_FP_REGS+(PT_R25*8))(r31)
   lfd  fp24,(SIGCONTEXT_FP_REGS+(PT_R24*8))(r31)
-  lfd  fp23,(SIGCONTEXT_FP_REGS+(PT_R23*8))(r31)	
+  lfd  fp23,(SIGCONTEXT_FP_REGS+(PT_R23*8))(r31)
   lfd  fp22,(SIGCONTEXT_FP_REGS+(PT_R22*8))(r31)
-  lfd  fp21,(SIGCONTEXT_FP_REGS+(PT_R21*8))(r31)	
+  lfd  fp21,(SIGCONTEXT_FP_REGS+(PT_R21*8))(r31)
   lfd  fp20,(SIGCONTEXT_FP_REGS+(PT_R20*8))(r31)
-  lfd  fp19,(SIGCONTEXT_FP_REGS+(PT_R19*8))(r31)	
+  lfd  fp19,(SIGCONTEXT_FP_REGS+(PT_R19*8))(r31)
   lfd  fp18,(SIGCONTEXT_FP_REGS+(PT_R18*8))(r31)
-  lfd  fp17,(SIGCONTEXT_FP_REGS+(PT_R17*8))(r31)	
+  lfd  fp17,(SIGCONTEXT_FP_REGS+(PT_R17*8))(r31)
   lfd  fp16,(SIGCONTEXT_FP_REGS+(PT_R16*8))(r31)
-  lfd  fp15,(SIGCONTEXT_FP_REGS+(PT_R15*8))(r31)	
+  lfd  fp15,(SIGCONTEXT_FP_REGS+(PT_R15*8))(r31)
   lfd  fp14,(SIGCONTEXT_FP_REGS+(PT_R14*8))(r31)
-  lfd  fp13,(SIGCONTEXT_FP_REGS+(PT_R13*8))(r31)	
+  lfd  fp13,(SIGCONTEXT_FP_REGS+(PT_R13*8))(r31)
   lfd  fp12,(SIGCONTEXT_FP_REGS+(PT_R12*8))(r31)
-  lfd  fp11,(SIGCONTEXT_FP_REGS+(PT_R11*8))(r31)	
+  lfd  fp11,(SIGCONTEXT_FP_REGS+(PT_R11*8))(r31)
   lfd  fp10,(SIGCONTEXT_FP_REGS+(PT_R10*8))(r31)
-  lfd  fp9,(SIGCONTEXT_FP_REGS+(PT_R9*8))(r31)	
+  lfd  fp9,(SIGCONTEXT_FP_REGS+(PT_R9*8))(r31)
   lfd  fp8,(SIGCONTEXT_FP_REGS+(PT_R8*8))(r31)
-  lfd  fp7,(SIGCONTEXT_FP_REGS+(PT_R7*8))(r31)	
+  lfd  fp7,(SIGCONTEXT_FP_REGS+(PT_R7*8))(r31)
   lfd  fp6,(SIGCONTEXT_FP_REGS+(PT_R6*8))(r31)
-  lfd  fp5,(SIGCONTEXT_FP_REGS+(PT_R5*8))(r31)	
+  lfd  fp5,(SIGCONTEXT_FP_REGS+(PT_R5*8))(r31)
   lfd  fp4,(SIGCONTEXT_FP_REGS+(PT_R4*8))(r31)
-  lfd  fp3,(SIGCONTEXT_FP_REGS+(PT_R3*8))(r31)	
+  lfd  fp3,(SIGCONTEXT_FP_REGS+(PT_R3*8))(r31)
   lfd  fp2,(SIGCONTEXT_FP_REGS+(PT_R2*8))(r31)
-  lfd  fp1,(SIGCONTEXT_FP_REGS+(PT_R1*8))(r31)	
+  lfd  fp1,(SIGCONTEXT_FP_REGS+(PT_R1*8))(r31)
   lfd  fp0,(SIGCONTEXT_FP_REGS+(PT_R0*8))(r31)
-  
-  ld   r0,(SIGCONTEXT_GP_REGS+(PT_LNK*8))(r31)  
+
+  ld   r0,(SIGCONTEXT_GP_REGS+(PT_LNK*8))(r31)
   ld   r1,(SIGCONTEXT_GP_REGS+(PT_R1*8))(r31)
   mtlr r0
   ld   r2,(SIGCONTEXT_GP_REGS+(PT_R2*8))(r31)
@@ -224,33 +224,33 @@ ENTRY(__novec_swapcontext)
   ld   r28,(SIGCONTEXT_GP_REGS+(PT_R28*8))(r31)
   ld   r29,(SIGCONTEXT_GP_REGS+(PT_R29*8))(r31)
   ld   r30,(SIGCONTEXT_GP_REGS+(PT_R30*8))(r31)
-    
+
   /* Now we branch to the "Next Instruction Pointer" from the saved
-     context.  With the powerpc64 instruction set there is no good way to 
+     context.  With the powerpc64 instruction set there is no good way to
      do this (from user state) without clobbering either the LR or CTR.
-     The makecontext and swapcontext functions depend on the callers 
+     The makecontext and swapcontext functions depend on the callers
      LR being preserved so we use the CTR.  */
   ld   r0,(SIGCONTEXT_GP_REGS+(PT_NIP*8))(r31)
   mtctr r0
   ld   r0,(SIGCONTEXT_GP_REGS+(PT_R0*8))(r31)
   ld   r31,(SIGCONTEXT_GP_REGS+(PT_R31*8))(r31)
   bctr
-  
+
 L(nv_error_exit):
-  ld    r0,128+FRAME_LR_SAVE(r1)  
+  ld    r0,128+FRAME_LR_SAVE(r1)
   addi  r1,r1,128
   mtlr  r0
   ld    r31,-8(r1)
   blr
 
-  /* At this point we assume that the ucontext was created by a 
-     rt_signal and we should use rt_sigreturn to restore the original 
-     state.  As of the 2.4.21 kernel the ucontext is the first thing 
-     (offset 0) in the rt_signal frame and rt_sigreturn expects the 
-     ucontext address in R1.  Normally the rt-signal trampoline handles 
-     this by popping dummy frame before the rt_signal syscall.  In our 
-     case the stack may not be in its original (signal handler return with 
-     R1 pointing at the dummy frame) state.  We do have the ucontext 
+  /* At this point we assume that the ucontext was created by a
+     rt_signal and we should use rt_sigreturn to restore the original
+     state.  As of the 2.4.21 kernel the ucontext is the first thing
+     (offset 0) in the rt_signal frame and rt_sigreturn expects the
+     ucontext address in R1.  Normally the rt-signal trampoline handles
+     this by popping dummy frame before the rt_signal syscall.  In our
+     case the stack may not be in its original (signal handler return with
+     R1 pointing at the dummy frame) state.  We do have the ucontext
      address in R3, so simply copy R3 to R1 before the syscall.  */
 L(nv_do_sigret):
   mr   r1,r3,
@@ -266,11 +266,11 @@ L(nv_do_sigret):
   bl   JUMPTARGET(__syscall_error)
   nop
   li   r3,-1
-  ld   r0,128+FRAME_LR_SAVE(r1)  
+  ld   r0,128+FRAME_LR_SAVE(r1)
   addi r1,r1,128
   mtlr r0
   blr
-#endif  
+#endif
 
 PSEUDO_END(__novec_swapcontext)
 
@@ -281,12 +281,12 @@ compat_symbol (libc, __novec_swapcontext, swapcontext, GLIBC_2_3)
 	.section	".toc","aw"
 .LC__dl_hwcap:
 #ifdef SHARED
-	.tc _rtld_global[TC],_rtld_global
+	.tc _rtld_global_ro[TC],_rtld_global_ro
 #else
 	.tc _dl_hwcap[TC],_dl_hwcap
 #endif
 	.section ".text"
-	
+
 ENTRY(__swapcontext)
 #ifdef __ASSUME_NEW_RT_SIGRETURN_SYSCALL
   std  r0,(SIGCONTEXT_GP_REGS+(PT_R0*8))(r3)
@@ -332,12 +332,12 @@ ENTRY(__swapcontext)
   std  r0,(SIGCONTEXT_GP_REGS+(PT_XER*8))(r3)
   mfcr  r0
   std  r0,(SIGCONTEXT_GP_REGS+(PT_CCR*8))(r3)
-  
-  /* Set the return value of swapcontext to "success".  R3 is the only 
+
+  /* Set the return value of swapcontext to "success".  R3 is the only
      register whose value is not preserved in the saved context.  */
   li   r0,0
   std  r0,(SIGCONTEXT_GP_REGS+(PT_R3*8))(r3)
-  
+
   /* Zero fill fields that can't be set in user state or are unused.  */
   std  r0,(SIGCONTEXT_GP_REGS+(PT_MSR*8))(r3)
   std  r0,(SIGCONTEXT_GP_REGS+(34*8))(r3)
@@ -346,14 +346,14 @@ ENTRY(__swapcontext)
   std  r0,(SIGCONTEXT_GP_REGS+(41*8))(r3)
   std  r0,(SIGCONTEXT_GP_REGS+(42*8))(r3)
   std  r0,(SIGCONTEXT_GP_REGS+(PT_RESULT*8))(r3)
-  
-  /* Set the PT_REGS pointer to the address of sigcontext gp_regs 
-     field.  Struct pt_regs and elf_gregset_t are the same thing.  
+
+  /* Set the PT_REGS pointer to the address of sigcontext gp_regs
+     field.  Struct pt_regs and elf_gregset_t are the same thing.
      We kept the regs field for backwards compatibility with
      libraries built before we extended sigcontext.  */
   addi r0,r3,SIGCONTEXT_GP_REGS
   std  r0,SIGCONTEXT_PT_REGS(r3)
-  
+
   stfd  fp0,(SIGCONTEXT_FP_REGS+(PT_R0*8))(r3)
   stfd  fp1,(SIGCONTEXT_FP_REGS+(PT_R1*8))(r3)
   stfd  fp2,(SIGCONTEXT_FP_REGS+(PT_R2*8))(r3)
@@ -388,115 +388,115 @@ ENTRY(__swapcontext)
   stfd  fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r3)
   stfd  fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r3)
   stfd  fp0,(SIGCONTEXT_FP_REGS+(32*8))(r3)
-  
+
   ld    r8,.LC__dl_hwcap@toc(r2)
   li    r10,0
-#ifdef SHARED  
+#ifdef SHARED
 /* Load _rtld-global._dl_hwcap.  */
-  ld    r8,RTLD_GLOBAL_DL_HWCAP_OFFSET(r8) 
-#else  
+  ld    r8,RTLD_GLOBAL_DL_HWCAP_OFFSET(r8)
+#else
   ld    r8,0(r8) /* Load extern _dl_hwcap.  */
 #endif
   andis.  r8,r8,(PPC_FEATURE_HAS_ALTIVEC >> 16)
   beq   L(has_no_vec)
-  
+
   la    r10,(SIGCONTEXT_V_RESERVE+8)(r3)
   la    r9,(SIGCONTEXT_V_RESERVE+24)(r3)
   clrrdi  r10,r10,4
   clrrdi  r9,r9,4
-  
-  stvx  v0,0,r10  
+
+  stvx  v0,0,r10
   stvx  v1,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v2,0,r10  
+
+  stvx  v2,0,r10
   stvx  v3,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v4,0,r10  
+
+  stvx  v4,0,r10
   stvx  v5,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v6,0,r10  
+
+  stvx  v6,0,r10
   stvx  v7,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v8,0,r10  
+
+  stvx  v8,0,r10
   stvx  v9,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v10,0,r10  
+
+  stvx  v10,0,r10
   stvx  v11,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v12,0,r10  
+
+  stvx  v12,0,r10
   stvx  v13,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v14,0,r10  
+
+  stvx  v14,0,r10
   stvx  v15,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v16,0,r10  
+
+  stvx  v16,0,r10
   stvx  v17,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v18,0,r10  
+
+  stvx  v18,0,r10
   stvx  v11,0,r9
   addi  r19,r10,32
   addi  r9,r9,32
-  
-  stvx  v20,0,r10  
+
+  stvx  v20,0,r10
   stvx  v21,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v22,0,r10  
+
+  stvx  v22,0,r10
   stvx  v23,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v24,0,r10  
+
+  stvx  v24,0,r10
   stvx  v25,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v26,0,r10  
+
+  stvx  v26,0,r10
   stvx  v27,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v28,0,r10  
+
+  stvx  v28,0,r10
   stvx  v29,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v30,0,r10  
+
+  stvx  v30,0,r10
   stvx  v31,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  stvx  v10,0,r10  
+
+  stvx  v10,0,r10
   stvx  v11,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
+
   mfvscr  v0
   mfspr r0,VRSAVE
   stvx  v0,0,r10
   stw   r0,0(9)
-  
+
 L(has_no_vec):
-/* 
+/*
    Store either a NULL or a quadword aligned pointer to the Vector register
    array into *v_regs.
 */
@@ -524,154 +524,154 @@ L(has_no_vec):
   lwz	  r0,(SIGCONTEXT_GP_REGS+(PT_MSR*8))(r31)
   cmpdi r0,0
   bne	  L(do_sigret)
-  
+
   ld    r8,.LC__dl_hwcap@toc(r2)
   ld    r10,(SIGCONTEXT_V_REGS_PTR)(r31)
-#ifdef SHARED  
+#ifdef SHARED
 /* Load _rtld-global._dl_hwcap.  */
-  ld    r8,RTLD_GLOBAL_DL_HWCAP_OFFSET(r8) 
-#else  
+  ld    r8,RTLD_GLOBAL_DL_HWCAP_OFFSET(r8)
+#else
   ld    r8,0(r8) /* Load extern _dl_hwcap.  */
 #endif
   andis.  r8,r8,(PPC_FEATURE_HAS_ALTIVEC >> 16)
   beq   L(has_no_vec2)
-  
+
   cmpdi r10,0
   beq   L(has_no_vec2)
   lwz   r0,(33*16)(r10)
-  
+
   li    r9,(16*32)
   mtspr VRSAVE,r0
   cmpwi r0,0
-  beq   L(has_no_vec2)  
-  
+  beq   L(has_no_vec2)
+
   lvx   v19,r9,r10
   la    r9,(16)(r10)
-  
-  lvx   v0,0,r10  
+
+  lvx   v0,0,r10
   lvx   v1,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
+
   mtvscr  v19
-  lvx   v2,0,r10  
+  lvx   v2,0,r10
   lvx   v3,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  lvx   v4,0,r10  
+
+  lvx   v4,0,r10
   lvx   v5,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  lvx   v6,0,r10  
+
+  lvx   v6,0,r10
   lvx   v7,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  lvx   v8,0,r10  
+
+  lvx   v8,0,r10
   lvx   v9,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  lvx   v10,0,r10  
+
+  lvx   v10,0,r10
   lvx   v11,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  lvx   v12,0,r10  
+
+  lvx   v12,0,r10
   lvx   v13,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  lvx   v14,0,r10  
+
+  lvx   v14,0,r10
   lvx   v15,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  lvx   v16,0,r10  
+
+  lvx   v16,0,r10
   lvx   v17,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  lvx   v18,0,r10  
+
+  lvx   v18,0,r10
   lvx   v11,0,r9
   addi  r19,r10,32
   addi  r9,r9,32
-  
-  lvx   v20,0,r10  
+
+  lvx   v20,0,r10
   lvx   v21,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  lvx   v22,0,r10  
+
+  lvx   v22,0,r10
   lvx   v23,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  lvx   v24,0,r10  
+
+  lvx   v24,0,r10
   lvx   v25,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  lvx   v26,0,r10  
+
+  lvx   v26,0,r10
   lvx   v27,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  lvx   v28,0,r10  
+
+  lvx   v28,0,r10
   lvx   v29,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  lvx   v30,0,r10  
+
+  lvx   v30,0,r10
   lvx   v31,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
-  lvx   v10,0,r10  
+
+  lvx   v10,0,r10
   lvx   v11,0,r9
   addi  r10,r10,32
   addi  r9,r9,32
-  
+
 L(has_no_vec2):
 
   lfd  fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31)
-  lfd  fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31)	
+  lfd  fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31)
   lfd  fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31)
   mtfsf  0xff,fp0
-  lfd  fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31)	
+  lfd  fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31)
   lfd  fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31)
-  lfd  fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31)	
+  lfd  fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31)
   lfd  fp26,(SIGCONTEXT_FP_REGS+(PT_R26*8))(r31)
-  lfd  fp25,(SIGCONTEXT_FP_REGS+(PT_R25*8))(r31)	
+  lfd  fp25,(SIGCONTEXT_FP_REGS+(PT_R25*8))(r31)
   lfd  fp24,(SIGCONTEXT_FP_REGS+(PT_R24*8))(r31)
-  lfd  fp23,(SIGCONTEXT_FP_REGS+(PT_R23*8))(r31)	
+  lfd  fp23,(SIGCONTEXT_FP_REGS+(PT_R23*8))(r31)
   lfd  fp22,(SIGCONTEXT_FP_REGS+(PT_R22*8))(r31)
-  lfd  fp21,(SIGCONTEXT_FP_REGS+(PT_R21*8))(r31)	
+  lfd  fp21,(SIGCONTEXT_FP_REGS+(PT_R21*8))(r31)
   lfd  fp20,(SIGCONTEXT_FP_REGS+(PT_R20*8))(r31)
-  lfd  fp19,(SIGCONTEXT_FP_REGS+(PT_R19*8))(r31)	
+  lfd  fp19,(SIGCONTEXT_FP_REGS+(PT_R19*8))(r31)
   lfd  fp18,(SIGCONTEXT_FP_REGS+(PT_R18*8))(r31)
-  lfd  fp17,(SIGCONTEXT_FP_REGS+(PT_R17*8))(r31)	
+  lfd  fp17,(SIGCONTEXT_FP_REGS+(PT_R17*8))(r31)
   lfd  fp16,(SIGCONTEXT_FP_REGS+(PT_R16*8))(r31)
-  lfd  fp15,(SIGCONTEXT_FP_REGS+(PT_R15*8))(r31)	
+  lfd  fp15,(SIGCONTEXT_FP_REGS+(PT_R15*8))(r31)
   lfd  fp14,(SIGCONTEXT_FP_REGS+(PT_R14*8))(r31)
-  lfd  fp13,(SIGCONTEXT_FP_REGS+(PT_R13*8))(r31)	
+  lfd  fp13,(SIGCONTEXT_FP_REGS+(PT_R13*8))(r31)
   lfd  fp12,(SIGCONTEXT_FP_REGS+(PT_R12*8))(r31)
-  lfd  fp11,(SIGCONTEXT_FP_REGS+(PT_R11*8))(r31)	
+  lfd  fp11,(SIGCONTEXT_FP_REGS+(PT_R11*8))(r31)
   lfd  fp10,(SIGCONTEXT_FP_REGS+(PT_R10*8))(r31)
-  lfd  fp9,(SIGCONTEXT_FP_REGS+(PT_R9*8))(r31)	
+  lfd  fp9,(SIGCONTEXT_FP_REGS+(PT_R9*8))(r31)
   lfd  fp8,(SIGCONTEXT_FP_REGS+(PT_R8*8))(r31)
-  lfd  fp7,(SIGCONTEXT_FP_REGS+(PT_R7*8))(r31)	
+  lfd  fp7,(SIGCONTEXT_FP_REGS+(PT_R7*8))(r31)
   lfd  fp6,(SIGCONTEXT_FP_REGS+(PT_R6*8))(r31)
-  lfd  fp5,(SIGCONTEXT_FP_REGS+(PT_R5*8))(r31)	
+  lfd  fp5,(SIGCONTEXT_FP_REGS+(PT_R5*8))(r31)
   lfd  fp4,(SIGCONTEXT_FP_REGS+(PT_R4*8))(r31)
-  lfd  fp3,(SIGCONTEXT_FP_REGS+(PT_R3*8))(r31)	
+  lfd  fp3,(SIGCONTEXT_FP_REGS+(PT_R3*8))(r31)
   lfd  fp2,(SIGCONTEXT_FP_REGS+(PT_R2*8))(r31)
-  lfd  fp1,(SIGCONTEXT_FP_REGS+(PT_R1*8))(r31)	
+  lfd  fp1,(SIGCONTEXT_FP_REGS+(PT_R1*8))(r31)
   lfd  fp0,(SIGCONTEXT_FP_REGS+(PT_R0*8))(r31)
-  
-  ld   r0,(SIGCONTEXT_GP_REGS+(PT_LNK*8))(r31)  
+
+  ld   r0,(SIGCONTEXT_GP_REGS+(PT_LNK*8))(r31)
   ld   r1,(SIGCONTEXT_GP_REGS+(PT_R1*8))(r31)
   mtlr r0
   ld   r2,(SIGCONTEXT_GP_REGS+(PT_R2*8))(r31)
@@ -707,33 +707,33 @@ L(has_no_vec2):
   ld   r28,(SIGCONTEXT_GP_REGS+(PT_R28*8))(r31)
   ld   r29,(SIGCONTEXT_GP_REGS+(PT_R29*8))(r31)
   ld   r30,(SIGCONTEXT_GP_REGS+(PT_R30*8))(r31)
-    
+
   /* Now we branch to the "Next Instruction Pointer" from the saved
-     context.  With the powerpc64 instruction set there is no good way to 
+     context.  With the powerpc64 instruction set there is no good way to
      do this (from user state) without clobbering either the LR or CTR.
-     The makecontext and swapcontext functions depend on the callers 
+     The makecontext and swapcontext functions depend on the callers
      LR being preserved so we use the CTR.  */
   ld   r0,(SIGCONTEXT_GP_REGS+(PT_NIP*8))(r31)
   mtctr r0
   ld   r0,(SIGCONTEXT_GP_REGS+(PT_R0*8))(r31)
   ld   r31,(SIGCONTEXT_GP_REGS+(PT_R31*8))(r31)
   bctr
-  
+
 L(error_exit):
-  ld    r0,128+FRAME_LR_SAVE(r1)  
+  ld    r0,128+FRAME_LR_SAVE(r1)
   addi  r1,r1,128
   mtlr  r0
   ld    r31,-8(r1)
   blr
 
-  /* At this point we assume that the ucontext was created by a 
-     rt_signal and we should use rt_sigreturn to restore the original 
-     state.  As of the 2.4.21 kernel the ucontext is the first thing 
-     (offset 0) in the rt_signal frame and rt_sigreturn expects the 
-     ucontext address in R1.  Normally the rt-signal trampoline handles 
-     this by popping dummy frame before the rt_signal syscall.  In our 
-     case the stack may not be in its original (signal handler return with 
-     R1 pointing at the dummy frame) state.  We do have the ucontext 
+  /* At this point we assume that the ucontext was created by a
+     rt_signal and we should use rt_sigreturn to restore the original
+     state.  As of the 2.4.21 kernel the ucontext is the first thing
+     (offset 0) in the rt_signal frame and rt_sigreturn expects the
+     ucontext address in R1.  Normally the rt-signal trampoline handles
+     this by popping dummy frame before the rt_signal syscall.  In our
+     case the stack may not be in its original (signal handler return with
+     R1 pointing at the dummy frame) state.  We do have the ucontext
      address in R3, so simply copy R3 to R1 before the syscall.  */
 L(do_sigret):
   mr   r1,r3,
@@ -749,11 +749,11 @@ L(do_sigret):
   bl   JUMPTARGET(__syscall_error)
   nop
   li   r3,-1
-  ld   r0,128+FRAME_LR_SAVE(r1)  
+  ld   r0,128+FRAME_LR_SAVE(r1)
   addi r1,r1,128
   mtlr r0
   blr
-#endif  
+#endif
 
 PSEUDO_END(__swapcontext)
 
diff --git a/sysdeps/unix/sysv/linux/prof-freq.c b/sysdeps/unix/sysv/linux/prof-freq.c
index a67c179700..621a4c4d25 100644
--- a/sysdeps/unix/sysv/linux/prof-freq.c
+++ b/sysdeps/unix/sysv/linux/prof-freq.c
@@ -1,5 +1,5 @@
 /* Determine realtime clock frequency.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004 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,10 +27,10 @@ int
 __profile_frequency (void)
 {
 #ifdef __ASSUME_AT_CLKTCK
-  return GL(dl_clktck);
+  return GLRO(dl_clktck);
 #else
-  if (GL(dl_clktck) != 0)
-    return GL(dl_clktck);
+  if (GLRO(dl_clktck) != 0)
+    return GLRO(dl_clktck);
 
   struct itimerval tim;
 
diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h
index 1637862b8f..302545f68f 100644
--- a/sysdeps/x86_64/dl-machine.h
+++ b/sysdeps/x86_64/dl-machine.h
@@ -116,7 +116,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 	{
 	  got[2] = (Elf64_Addr) &_dl_runtime_profile;
 
-	  if (_dl_name_match_p (GL(dl_profile), l))
+	  if (_dl_name_match_p (GLRO(dl_profile), l))
 	    /* This is the object we are looking for.  Say that we really
 	       want profiling and the timers are started.  */
 	    GL(dl_profile_map) = l;
@@ -326,9 +326,9 @@ _dl_start_user:\n\
 static inline void __attribute__ ((unused))
 dl_platform_init (void)
 {
-  if (GL(dl_platform) != NULL && *GL(dl_platform) == '\0')
+  if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0')
     /* Avoid an empty string which would disturb us.  */
-    GL(dl_platform) = NULL;
+    GLRO(dl_platform) = NULL;
 }
 
 static inline Elf64_Addr
@@ -497,7 +497,7 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
 	    break;
 	  if (__builtin_expect (sym->st_size > refsym->st_size, 0)
 	      || (__builtin_expect (sym->st_size < refsym->st_size, 0)
-		  && GL(dl_verbose)))
+		  && GLRO(dl_verbose)))
 	    {
 	      const char *strtab;