[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r23176 - in /fsf/trunk/libc: ./ elf/ po/ ports/ ports/sysdeps/aarch64/ ports/sysdeps/arm/ ports/sysdeps/hppa/ ports/sysdeps/...



Author: eglibc
Date: Thu May 30 00:02:08 2013
New Revision: 23176

Log:
Import glibc-mainline for 2013-05-30

Added:
    fsf/trunk/libc/elf/tst-null-argv-lib.c
    fsf/trunk/libc/elf/tst-null-argv.c
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/elf/Makefile
    fsf/trunk/libc/elf/dl-conflict.c
    fsf/trunk/libc/elf/dl-deps.c
    fsf/trunk/libc/elf/dl-error.c
    fsf/trunk/libc/elf/dl-fini.c
    fsf/trunk/libc/elf/dl-init.c
    fsf/trunk/libc/elf/dl-load.c
    fsf/trunk/libc/elf/dl-lookup.c
    fsf/trunk/libc/elf/dl-open.c
    fsf/trunk/libc/elf/dl-reloc.c
    fsf/trunk/libc/elf/dl-version.c
    fsf/trunk/libc/elf/rtld.c
    fsf/trunk/libc/po/be.po
    fsf/trunk/libc/po/header.pot
    fsf/trunk/libc/po/zh_CN.po
    fsf/trunk/libc/ports/ChangeLog.aarch64
    fsf/trunk/libc/ports/ChangeLog.arm
    fsf/trunk/libc/ports/ChangeLog.hppa
    fsf/trunk/libc/ports/ChangeLog.m68k
    fsf/trunk/libc/ports/ChangeLog.microblaze
    fsf/trunk/libc/ports/ChangeLog.mips
    fsf/trunk/libc/ports/ChangeLog.tile
    fsf/trunk/libc/ports/sysdeps/aarch64/dl-machine.h
    fsf/trunk/libc/ports/sysdeps/arm/dl-machine.h
    fsf/trunk/libc/ports/sysdeps/hppa/dl-machine.h
    fsf/trunk/libc/ports/sysdeps/m68k/dl-machine.h
    fsf/trunk/libc/ports/sysdeps/microblaze/dl-machine.h
    fsf/trunk/libc/ports/sysdeps/mips/dl-lookup.c
    fsf/trunk/libc/ports/sysdeps/mips/dl-machine.h
    fsf/trunk/libc/ports/sysdeps/tile/dl-machine.h
    fsf/trunk/libc/sysdeps/generic/ldsodefs.h
    fsf/trunk/libc/sysdeps/i386/dl-machine.h
    fsf/trunk/libc/sysdeps/powerpc/powerpc32/dl-machine.c
    fsf/trunk/libc/sysdeps/powerpc/powerpc64/dl-machine.h
    fsf/trunk/libc/sysdeps/s390/s390-32/dl-machine.h
    fsf/trunk/libc/sysdeps/s390/s390-64/dl-machine.h
    fsf/trunk/libc/sysdeps/sh/dl-machine.h
    fsf/trunk/libc/sysdeps/sparc/sparc32/dl-machine.h
    fsf/trunk/libc/sysdeps/sparc/sparc64/dl-machine.h
    fsf/trunk/libc/sysdeps/x86_64/dl-machine.h

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu May 30 00:02:08 2013
@@ -1,3 +1,56 @@
+2013-05-29  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	[BZ #15465]
+	* elf/Makefile (tests): Add tst-null-argv.
+	(modules-names):  Add tst-null-argv-lib.
+	($(objpfx)tst-null-argv): Depend on tst-null-argv-lib.so.
+	(tst-null-argv-ENV): Set environment for tst-null-argv.
+	* sysdeps/generic/ldsodefs.h (DSO_FILENAME): New macro.
+	(RTLD_PROGNAME): New macro.
+	* elf/tst-null-argv.c: New test case.
+	* elf/tst-null-argv-lib.c: Library for test case.
+	* elf/dl-conflict.c (_dl_resolve_conflicts): Use DSO_FILENAME.
+	* elf/dl-deps.c (_dl_map_object_deps): Likewise.
+	* elf/dl-error.c (_dl_signal_error): Use RTLD_PROGNAME.
+	* elf/dl-fini.c (_dl_fini): Use DSO_FILENAME.
+	* elf/dl-init.c (call_init): Likewise.
+	(_dl_init): Likewise.
+	* elf/dl-load.c (print_search_path): Likewise.
+	(_dl_map_object): Likewise.
+	* elf/dl-lookup.c (do_lookup_x): Likewise.
+	(add_dependency): Likewise.
+	(_dl_lookup_symbol_x): Likewise.
+	(_dl_debug_bindings): Likewise.
+	* elf/dl-open.c (_dl_show_scope): Likewise.
+	* elf/dl-reloc.c (_dl_relocate_object): Likewise.
+	* elf/dl-version.c (match_symbol): Likewise.
+	(_dl_check_map_versions): Likewise.
+	* elf/rtld.c (dl_main): Likewise.
+	(print_unresolved): Use RTLD_PROGNAME.
+	(print_missing_version): Likewise.
+	* sysdeps/i386/dl-machine.h (elf_machine_rel): Likewise.
+	(elf_machine_rela): Likewise.
+	* sysdeps/powerpc/powerpc32/dl-machine.c
+	(__process_machine_rela): Likewise.
+	* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela):
+	Likewise.
+	* sysdeps/s390/s390-32/dl-machine.h (elf_machine_rela):
+	Likewise.
+	* sysdeps/s390/s390-64/dl-machine.h (elf_machine_rela):
+	Likewise.
+	* sysdeps/sh/dl-machine.h (elf_machine_rela): Likewise.
+	* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela):
+	Likewise.
+	* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela):
+	Likewise.
+	* sysdeps/x86_64/dl-machine.h (elf_machine_rela): Likewise.
+
+2013-05-28  Carlos O'Donell  <carlos@xxxxxxxxxx>
+
+	* po/be.po: Add descriptive title.
+	* po/zh_CN.po: Likewise.
+	* po/header.pot: Likewise.
+
 2013-05-28  Mike Frysinger  <vapier@xxxxxxxxxx>
 
 	* locale/programs/locarchive.c (create_archive): Inlucde fname in

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Thu May 30 00:02:08 2013
@@ -18,8 +18,8 @@
   15287, 15304, 15305, 15307, 15309, 15327, 15330, 15335, 15336, 15337,
   15339, 15342, 15346, 15359, 15361, 15366, 15380, 15381, 15394, 15395,
   15405, 15406, 15409, 15416, 15418, 15419, 15423, 15424, 15426, 15429,
-  15441, 15442, 15448, 15480, 15485, 15488, 15490, 15493, 15497, 15506,
-  15529.
+  15441, 15442, 15448, 15465, 15480, 15485, 15488, 15490, 15493, 15497,
+  15506, 15529.
 
 * CVE-2013-0242 Buffer overrun in regexp matcher has been fixed (Bugzilla
   #15078).

Modified: fsf/trunk/libc/elf/Makefile
==============================================================================
--- fsf/trunk/libc/elf/Makefile (original)
+++ fsf/trunk/libc/elf/Makefile Thu May 30 00:02:08 2013
@@ -145,7 +145,7 @@
 	 tst-audit1 tst-audit2 tst-audit8 \
 	 tst-stackguard1 tst-addr1 tst-thrlock \
 	 tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
-	 tst-initorder tst-initorder2 tst-relsort1
+	 tst-initorder tst-initorder2 tst-relsort1 tst-null-argv
 #	 reldep9
 test-srcs = tst-pathopt
 selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
@@ -208,7 +208,7 @@
 		tst-initorder2a tst-initorder2b tst-initorder2c \
 		tst-initorder2d \
 		tst-relsort1mod1 tst-relsort1mod2 tst-array2dep \
-		tst-array5dep
+		tst-array5dep tst-null-argv-lib
 ifeq (yesyes,$(have-fpie)$(build-shared))
 modules-names += tst-piemod1
 tests += tst-pie1
@@ -494,7 +494,9 @@
 $(objpfx)tst-initordera3.so: $(objpfx)tst-initorderb2.so $(objpfx)tst-initorderb1.so
 $(objpfx)tst-initordera4.so: $(objpfx)tst-initordera3.so
 $(objpfx)tst-initorder: $(objpfx)tst-initordera4.so $(objpfx)tst-initordera1.so $(objpfx)tst-initorderb2.so
-
+$(objpfx)tst-null-argv: $(objpfx)tst-null-argv-lib.so
+
+tst-null-argv-ENV = LD_DEBUG=all LD_DEBUG_OUTPUT=$(objpfx)tst-null-argv.debug.out
 LDFLAGS-nodel2mod3.so = $(no-as-needed)
 LDFLAGS-reldepmod5.so = $(no-as-needed)
 LDFLAGS-reldep6mod1.so = $(no-as-needed)

Modified: fsf/trunk/libc/elf/dl-conflict.c
==============================================================================
--- fsf/trunk/libc/elf/dl-conflict.c (original)
+++ fsf/trunk/libc/elf/dl-conflict.c Thu May 30 00:02:08 2013
@@ -33,8 +33,7 @@
 {
 #if ! ELF_MACHINE_NO_RELA
   if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_RELOC, 0))
-    _dl_debug_printf ("\nconflict processing: %s\n",
-		      l->l_name[0] ? l->l_name : rtld_progname);
+    _dl_debug_printf ("\nconflict processing: %s\n", DSO_FILENAME (l->l_name));
 
   {
     /* Do the conflict relocation of the object and library GOT and other

Modified: fsf/trunk/libc/elf/dl-deps.c
==============================================================================
--- fsf/trunk/libc/elf/dl-deps.c (original)
+++ fsf/trunk/libc/elf/dl-deps.c Thu May 30 00:02:08 2013
@@ -310,8 +310,7 @@
 		      _dl_debug_printf ("load auxiliary object=%s"
 					" requested by file=%s\n",
 					name,
-					l->l_name[0]
-					? l->l_name : rtld_progname);
+					DSO_FILENAME (l->l_name));
 
 		    /* We must be prepared that the addressed shared
 		       object is not available.  */
@@ -337,8 +336,7 @@
 		      _dl_debug_printf ("load filtered object=%s"
 					" requested by file=%s\n",
 					name,
-					l->l_name[0]
-					? l->l_name : rtld_progname);
+					DSO_FILENAME (l->l_name));
 
 		    /* For filter objects the dependency must be available.  */
 		    bool malloced;

Modified: fsf/trunk/libc/elf/dl-error.c
==============================================================================
--- fsf/trunk/libc/elf/dl-error.c (original)
+++ fsf/trunk/libc/elf/dl-error.c Thu May 30 00:02:08 2013
@@ -119,7 +119,7 @@
       /* Lossage while resolving the program's own symbols is always fatal.  */
       char buffer[1024];
       _dl_fatal_printf ("%s: %s: %s%s%s%s%s\n",
-			rtld_progname ?: "<program name unknown>",
+			RTLD_PROGNAME,
 			occation ?: N_("error while loading shared libraries"),
 			objname, *objname ? ": " : "",
 			errstring, errcode ? ": " : "",

Modified: fsf/trunk/libc/elf/dl-fini.c
==============================================================================
--- fsf/trunk/libc/elf/dl-fini.c (original)
+++ fsf/trunk/libc/elf/dl-fini.c Thu May 30 00:02:08 2013
@@ -237,7 +237,7 @@
 		  if (__builtin_expect (GLRO(dl_debug_mask)
 					& DL_DEBUG_IMPCALLS, 0))
 		    _dl_debug_printf ("\ncalling fini: %s [%lu]\n\n",
-				      l->l_name[0] ? l->l_name : rtld_progname,
+				      DSO_FILENAME (l->l_name),
 				      ns);
 
 		  /* First see whether an array is given.  */

Modified: fsf/trunk/libc/elf/dl-init.c
==============================================================================
--- fsf/trunk/libc/elf/dl-init.c (original)
+++ fsf/trunk/libc/elf/dl-init.c Thu May 30 00:02:08 2013
@@ -54,7 +54,7 @@
   /* Print a debug message if wanted.  */
   if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
     _dl_debug_printf ("\ncalling init: %s\n\n",
-		      l->l_name[0] ? l->l_name : rtld_progname);
+		      DSO_FILENAME (l->l_name));
 
   /* Now run the local constructors.  There are two forms of them:
      - the one named by DT_INIT
@@ -110,8 +110,7 @@
 
       if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
 	_dl_debug_printf ("\ncalling preinit: %s\n\n",
-			  main_map->l_name[0]
-			  ? main_map->l_name : rtld_progname);
+			  DSO_FILENAME (main_map->l_name));
 
       addrs = (ElfW(Addr) *) (preinit_array->d_un.d_ptr + main_map->l_addr);
       for (cnt = 0; cnt < i; ++cnt)

Modified: fsf/trunk/libc/elf/dl-load.c
==============================================================================
--- fsf/trunk/libc/elf/dl-load.c (original)
+++ fsf/trunk/libc/elf/dl-load.c Thu May 30 00:02:08 2013
@@ -1651,7 +1651,7 @@
 
   if (name != NULL)
     _dl_debug_printf_c ("\t\t(%s from file %s)\n", what,
-			name[0] ? name : rtld_progname);
+			DSO_FILENAME (name));
   else
     _dl_debug_printf_c ("\t\t(%s)\n", what);
 }
@@ -2124,8 +2124,7 @@
     _dl_debug_printf ((mode & __RTLD_CALLMAP) == 0
 		      ? "\nfile=%s [%lu];  needed by %s [%lu]\n"
 		      : "\nfile=%s [%lu];  dynamically loaded by %s [%lu]\n",
-		      name, nsid, loader->l_name[0]
-		      ? loader->l_name : rtld_progname, loader->l_ns);
+		      name, nsid, DSO_FILENAME (loader->l_name), loader->l_ns);
 
 #ifdef SHARED
   /* Give the auditing libraries a chance to change the name before we

Modified: fsf/trunk/libc/elf/dl-lookup.c
==============================================================================
--- fsf/trunk/libc/elf/dl-lookup.c (original)
+++ fsf/trunk/libc/elf/dl-lookup.c Thu May 30 00:02:08 2013
@@ -112,8 +112,7 @@
       /* Print some debugging info if wanted.  */
       if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS, 0))
 	_dl_debug_printf ("symbol=%s;  lookup in file=%s [%lu]\n",
-			  undef_name,
-			  map->l_name[0] ? map->l_name : rtld_progname,
+			  undef_name, DSO_FILENAME (map->l_name),
 			  map->l_ns);
 
       /* If the hash table is empty there is nothing to do here.  */
@@ -667,10 +666,9 @@
       if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
 	_dl_debug_printf ("\
 \nfile=%s [%lu];  needed by %s [%lu] (relocation dependency)\n\n",
-			  map->l_name[0] ? map->l_name : rtld_progname,
+			  DSO_FILENAME (map->l_name),
 			  map->l_ns,
-			  undef_map->l_name[0]
-			  ? undef_map->l_name : rtld_progname,
+			  DSO_FILENAME (undef_map->l_name),
 			  undef_map->l_ns);
     }
   else
@@ -751,9 +749,7 @@
 	  const char *reference_name = undef_map ? undef_map->l_name : NULL;
 
 	  /* XXX We cannot translate the message.  */
-	  _dl_signal_cerror (0, (reference_name[0]
-				 ? reference_name
-				 : (rtld_progname ?: "<main program>")),
+	  _dl_signal_cerror (0, DSO_FILENAME (reference_name),
 			     N_("relocation error"),
 			     make_string ("symbol ", undef_name, ", version ",
 					  version->name,
@@ -780,9 +776,7 @@
 				     ? version->name : "");
 
 	  /* XXX We cannot translate the message.  */
-	  _dl_signal_cerror (0, (reference_name[0]
-				 ? reference_name
-				 : (rtld_progname ?: "<main program>")),
+	  _dl_signal_cerror (0, DSO_FILENAME (reference_name),
 			     N_("symbol lookup error"),
 			     make_string (undefined_msg, undef_name,
 					  versionstr, versionname));
@@ -912,11 +906,9 @@
   if (GLRO(dl_debug_mask) & DL_DEBUG_BINDINGS)
     {
       _dl_debug_printf ("binding file %s [%lu] to %s [%lu]: %s symbol `%s'",
-			(reference_name[0]
-			 ? reference_name
-			 : (rtld_progname ?: "<main program>")),
+			DSO_FILENAME (reference_name),
 			undef_map->l_ns,
-			value->m->l_name[0] ? value->m->l_name : rtld_progname,
+			DSO_FILENAME (value->m->l_name),
 			value->m->l_ns,
 			protected ? "protected" : "normal", undef_name);
       if (version)

Modified: fsf/trunk/libc/elf/dl-open.c
==============================================================================
--- fsf/trunk/libc/elf/dl-open.c (original)
+++ fsf/trunk/libc/elf/dl-open.c Thu May 30 00:02:08 2013
@@ -733,7 +733,7 @@
 _dl_show_scope (struct link_map *l, int from)
 {
   _dl_debug_printf ("object=%s [%lu]\n",
-		    *l->l_name ? l->l_name : rtld_progname, l->l_ns);
+		    DSO_FILENAME (l->l_name), l->l_ns);
   if (l->l_scope != NULL)
     for (int scope_cnt = from; l->l_scope[scope_cnt] != NULL; ++scope_cnt)
       {
@@ -744,7 +744,7 @@
 	    _dl_debug_printf_c (" %s",
 				l->l_scope[scope_cnt]->r_list[cnt]->l_name);
 	  else
-	    _dl_debug_printf_c (" %s", rtld_progname);
+	    _dl_debug_printf_c (" %s", RTLD_PROGNAME);
 
 	_dl_debug_printf_c ("\n");
       }

Modified: fsf/trunk/libc/elf/dl-reloc.c
==============================================================================
--- fsf/trunk/libc/elf/dl-reloc.c (original)
+++ fsf/trunk/libc/elf/dl-reloc.c Thu May 30 00:02:08 2013
@@ -185,8 +185,7 @@
 
   if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_RELOC, 0))
     _dl_debug_printf ("\nrelocation processing: %s%s\n",
-		      l->l_name[0] ? l->l_name : rtld_progname,
-		      lazy ? " (lazy)" : "");
+		      DSO_FILENAME (l->l_name), lazy ? " (lazy)" : "");
 
   /* DT_TEXTREL is now in level 2 and might phase out at some time.
      But we rewrite the DT_FLAGS entry to a DT_TEXTREL entry to make
@@ -276,7 +275,7 @@
 	    errstring = N_("%s: no PLTREL found in object %s\n");
 	  fatal:
 	    _dl_fatal_printf (errstring,
-			      rtld_progname ?: "<program name unknown>",
+			      RTLD_PROGNAME,
 			      l->l_name);
 	  }
 

Modified: fsf/trunk/libc/elf/dl-version.c
==============================================================================
--- fsf/trunk/libc/elf/dl-version.c (original)
+++ fsf/trunk/libc/elf/dl-version.c Thu May 30 00:02:08 2013
@@ -85,7 +85,7 @@
   if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_VERSIONS, 0))
     _dl_debug_printf ("\
 checking for version `%s' in file %s [%lu] required by file %s [%lu]\n",
-		      string, map->l_name[0] ? map->l_name : rtld_progname,
+		      string, DSO_FILENAME (map->l_name),
 		      map->l_ns, name, ns);
 
   if (__builtin_expect (map->l_info[VERSYMIDX (DT_VERDEF)] == NULL, 0))
@@ -162,7 +162,7 @@
 			   name, ")");
   result = 1;
  call_cerror:
-  _dl_signal_cerror (0, map->l_name[0] ? map->l_name : rtld_progname,
+  _dl_signal_cerror (0, DSO_FILENAME (map->l_name),
 		     N_("version lookup error"), errstring);
   return result;
 }
@@ -210,7 +210,7 @@
 					  &buf[sizeof (buf) - 1], 10, 0),
 				   " of Verneed record\n");
 	call_error:
-	  _dl_signal_error (errval, *map->l_name ? map->l_name : rtld_progname,
+	  _dl_signal_error (errval, DSO_FILENAME (map->l_name),
 			    NULL, errstring);
 	}
 
@@ -234,8 +234,7 @@
 	      while (1)
 		{
 		  /* Match the symbol.  */
-		  result |= match_symbol ((*map->l_name
-					   ? map->l_name : rtld_progname),
+		  result |= match_symbol (DSO_FILENAME (map->l_name),
 					  map->l_ns, aux->vna_hash,
 					  strtab + aux->vna_name,
 					  needed->l_real, verbose,

Modified: fsf/trunk/libc/elf/rtld.c
==============================================================================
--- fsf/trunk/libc/elf/rtld.c (original)
+++ fsf/trunk/libc/elf/rtld.c Thu May 30 00:02:08 2013
@@ -1840,10 +1840,8 @@
 	      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>",
-			  l->l_name[0] ? l->l_name
-			  : rtld_progname ?: "<main program>",
+			  DSO_FILENAME (l->l_libname->name),
+			  DSO_FILENAME (l->l_name),
 			  (int) sizeof l->l_map_start * 2,
 			  (size_t) l->l_map_start,
 			  (int) sizeof l->l_addr * 2,
@@ -2000,8 +1998,7 @@
 		      first = 0;
 		    }
 
-		  _dl_printf ("\t%s:\n",
-			      map->l_name[0] ? map->l_name : rtld_progname);
+		  _dl_printf ("\t%s:\n", DSO_FILENAME (map->l_name));
 
 		  while (1)
 		    {
@@ -2324,7 +2321,7 @@
 		  const char *errstring)
 {
   if (objname[0] == '\0')
-    objname = rtld_progname ?: "<main program>";
+    objname = RTLD_PROGNAME;
   _dl_error_printf ("%s	(%s)\n", errstring, objname);
 }
 
@@ -2334,7 +2331,7 @@
 print_missing_version (int errcode __attribute__ ((unused)),
 		       const char *objname, const char *errstring)
 {
-  _dl_error_printf ("%s: %s: %s\n", rtld_progname ?: "<program name unknown>",
+  _dl_error_printf ("%s: %s: %s\n", RTLD_PROGNAME,
 		    objname, errstring);
 }
 

Added: fsf/trunk/libc/elf/tst-null-argv-lib.c
==============================================================================
--- fsf/trunk/libc/elf/tst-null-argv-lib.c (added)
+++ fsf/trunk/libc/elf/tst-null-argv-lib.c Thu May 30 00:02:08 2013
@@ -1,0 +1,24 @@
+/* Verify that program does not crash when LD_DEBUG is set and the program name
+   is not available.  This is the library.
+   Copyright (C) 2013 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+void
+foo (void)
+{
+  return;
+}

Added: fsf/trunk/libc/elf/tst-null-argv.c
==============================================================================
--- fsf/trunk/libc/elf/tst-null-argv.c (added)
+++ fsf/trunk/libc/elf/tst-null-argv.c Thu May 30 00:02:08 2013
@@ -1,0 +1,35 @@
+/* Verify that program does not crash when LD_DEBUG is set and the program name
+   is not available.
+   Copyright (C) 2013 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+extern void foo (void);
+
+int
+do_test (int argc, char **argv)
+{
+  argv[0] = argv[1];
+  argc--;
+
+  /* This should result in a symbol lookup, causing a volley of debug output
+     when LD_DEBUG=symbols.  */
+  foo ();
+
+  return 0;
+}
+
+#include <test-skeleton.c>

Modified: fsf/trunk/libc/po/be.po
==============================================================================
--- fsf/trunk/libc/po/be.po (original)
+++ fsf/trunk/libc/po/be.po Thu May 30 00:02:08 2013
@@ -1,4 +1,4 @@
-# SOME DESCRIPTIVE TITLE.
+# Belarusian messages for the GNU C Library.
 # Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 # Ales Nyakhaychyk <nab@xxxxxxx>, 2002, 2003.
 #

Modified: fsf/trunk/libc/po/header.pot
==============================================================================
--- fsf/trunk/libc/po/header.pot (original)
+++ fsf/trunk/libc/po/header.pot Thu May 30 00:02:08 2013
@@ -1,4 +1,4 @@
-# SOME DESCRIPTIVE TITLE.
+# English (American) messages for the GNU C Library.
 # Copyright (C) YEAR Free Software Foundation, Inc.
 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
 #

Modified: fsf/trunk/libc/po/zh_CN.po
==============================================================================
--- fsf/trunk/libc/po/zh_CN.po (original)
+++ fsf/trunk/libc/po/zh_CN.po Thu May 30 00:02:08 2013
@@ -1,4 +1,4 @@
-# SOME DESCRIPTIVE TITLE.
+# Chinese (simplified) messages for the GNU C Library.
 # Copyright (C) 2002, 2007 Free Software Foundation, Inc.
 # LI Daobing <lidaobing@xxxxxxxxx>, 2007.
 # Wang Li <charles@xxxxxxxxxxxx>, 2002.

Modified: fsf/trunk/libc/ports/ChangeLog.aarch64
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.aarch64 (original)
+++ fsf/trunk/libc/ports/ChangeLog.aarch64 Thu May 30 00:02:08 2013
@@ -1,3 +1,9 @@
+2013-05-29  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	[BZ #15465]
+	* sysdeps/aarch64/dl-machine.h (elf_machine_rela): Use
+	RTLD_PROGNAME.
+
 2013-05-23  Venkataranmanan Kumar  <venkataramanan.kumar@xxxxxxxxxx>
 
 	* sysdeps/aarch64/machine-gmon.h: Remove.
@@ -82,7 +88,7 @@
 
 2013-01-23  Marcus Shawcroft  <marcus.shawcroft@xxxxxxxxxx>
 
-        * sysdeps/aarch64/strncmp.S: New file.
+	* sysdeps/aarch64/strncmp.S: New file.
 
 2013-01-23  Marcus Shawcroft  <marcus.shawcroft@xxxxxxxxxx>
 
@@ -91,23 +97,23 @@
 
 2013-01-17  Marcus Shawcroft  <marcus.shawcroft@xxxxxxxxxx>
 
-        * sysdeps/aarch64/strlen.S: New file.
-
-2013-01-17  Marcus Shawcroft  <marcus.shawcroft@xxxxxxxxxx>
-
-        * sysdeps/aarch64/strcmp.S: New file.
-
-2013-01-17  Marcus Shawcroft  <marcus.shawcroft@xxxxxxxxxx>
-
-        * sysdeps/aarch64/bzero.S: New file.
-
-2013-01-17  Marcus Shawcroft  <marcus.shawcroft@xxxxxxxxxx>
-
-        * sysdeps/aarch64/memmove.S: New file.
-
-2013-01-17  Marcus Shawcroft  <marcus.shawcroft@xxxxxxxxxx>
-
-        * sysdeps/aarch64/memcpy.S: New file.
+	* sysdeps/aarch64/strlen.S: New file.
+
+2013-01-17  Marcus Shawcroft  <marcus.shawcroft@xxxxxxxxxx>
+
+	* sysdeps/aarch64/strcmp.S: New file.
+
+2013-01-17  Marcus Shawcroft  <marcus.shawcroft@xxxxxxxxxx>
+
+	* sysdeps/aarch64/bzero.S: New file.
+
+2013-01-17  Marcus Shawcroft  <marcus.shawcroft@xxxxxxxxxx>
+
+	* sysdeps/aarch64/memmove.S: New file.
+
+2013-01-17  Marcus Shawcroft  <marcus.shawcroft@xxxxxxxxxx>
+
+	* sysdeps/aarch64/memcpy.S: New file.
 
 2013-01-17  Marcus Shawcroft  <marcus.shawcroft@xxxxxxxxxx>
 

Modified: fsf/trunk/libc/ports/ChangeLog.arm
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.arm (original)
+++ fsf/trunk/libc/ports/ChangeLog.arm Thu May 30 00:02:08 2013
@@ -1,3 +1,10 @@
+2013-05-29  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	[BZ #15465]
+	* sysdeps/arm/dl-machine.h (elf_machine_rel): Use
+	RTLD_PROGNAME.
+	(elf_machine_rela): Likewise.
+
 2013-05-22  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/arm/libm-test-ulps: Update test names.

Modified: fsf/trunk/libc/ports/ChangeLog.hppa
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.hppa (original)
+++ fsf/trunk/libc/ports/ChangeLog.hppa Thu May 30 00:02:08 2013
@@ -1,3 +1,10 @@
+2013-05-29  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	[BZ #15465]
+	* sysdeps/hppa/dl-machine.h (elf_machine_rela): Use
+	RTLD_PROGNAME.
+	(elf_machine_rela_relative): Likewise.
+
 2013-05-22  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/hppa/fpu/libm-test-ulps: Update test names.

Modified: fsf/trunk/libc/ports/ChangeLog.m68k
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.m68k (original)
+++ fsf/trunk/libc/ports/ChangeLog.m68k Thu May 30 00:02:08 2013
@@ -1,3 +1,9 @@
+2013-05-29  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	[BZ #15465]
+	* sysdeps/m68k/dl-machine.h (elf_machine_rela): Use
+	RTLD_PROGNAME.
+
 2013-05-22  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/m68k/coldfire/fpu/libm-test-ulps: Update test names.

Modified: fsf/trunk/libc/ports/ChangeLog.microblaze
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.microblaze (original)
+++ fsf/trunk/libc/ports/ChangeLog.microblaze Thu May 30 00:02:08 2013
@@ -1,3 +1,9 @@
+2013-05-29  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	[BZ #15465]
+	* sysdeps/microblaze/dl-machine.h (elf_machine_rela): Use
+	RTLD_PROGNAME.
+
 2013-05-22  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/microblaze/libm-test-ulps: Update test names.

Modified: fsf/trunk/libc/ports/ChangeLog.mips
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.mips (original)
+++ fsf/trunk/libc/ports/ChangeLog.mips Thu May 30 00:02:08 2013
@@ -1,3 +1,13 @@
+2013-05-29  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	[BZ #15465]
+	* sysdeps/mips/dl-lookup.c (do_lookup_x): Use DSO_FILENAME.
+	(add_dependency): Likewise.
+	(_dl_lookup_symbol_x): Likewise.
+	(_dl_debug_bindings): Likewise.
+	* sysdeps/mips/dl-machine.h (elf_machine_reloc): Use
+	RTLD_PROGNAME.
+
 2013-05-22  Edjunior Barbosa Machado  <emachado@xxxxxxxxxxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/mips/bits/siginfo.h (siginfo_t): Add
@@ -79,8 +89,8 @@
 	* sysdeps/unix/sysv/linux/mips/bits/msq.h (MSG_COPY): Define.
 
 2013-02-27  Chung-Lin Tang  <cltang@xxxxxxxxxxxxxxxx>
-            Maciej W. Rozycki  <macro@xxxxxxxxxxxxxxxx>
-            Maxim Kuvyrkov  <maxim@xxxxxxxxxxxxxxxx>
+	    Maciej W. Rozycki  <macro@xxxxxxxxxxxxxxxx>
+	    Maxim Kuvyrkov  <maxim@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/mips/abort-instr.h (ABORT_INSTRUCTION) [__mips16]:
 	New macro.
@@ -541,7 +551,7 @@
 
 2012-11-06  Maxim Kuvyrkov  <maxim@xxxxxxxxxxxxxxxx>
 
-        * sysdeps/mips/memmove.c: New file.  Use memcpy for forward memmove.
+	* sysdeps/mips/memmove.c: New file.  Use memcpy for forward memmove.
 
 2012-11-05  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
@@ -693,14 +703,14 @@
 
 2012-08-13  Maxim Kuvyrkov  <maxim@xxxxxxxxxxxxxxxx>
 
-        [__GNUC_PREREQ (4, 8)]
-        (atomic_exchange_and_add): Split into ...
-        (atomic_exchange_and_add_acq, atomic_exchange_and_add_rel): ... these.
-        New atomic macros.
-        [!__GNUC_PREREQ (4, 8)]
-        (atomic_exchange_and_add): Split into ...
-        (atomic_exchange_and_add_acq, atomic_exchange_and_add_rel): ... these.
-        New atomic macros.
+	[__GNUC_PREREQ (4, 8)]
+	(atomic_exchange_and_add): Split into ...
+	(atomic_exchange_and_add_acq, atomic_exchange_and_add_rel): ... these.
+	New atomic macros.
+	[!__GNUC_PREREQ (4, 8)]
+	(atomic_exchange_and_add): Split into ...
+	(atomic_exchange_and_add_acq, atomic_exchange_and_add_rel): ... these.
+	New atomic macros.
 
 2012-08-09  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
@@ -762,21 +772,21 @@
 	Likewise.
 
 2012-07-11  Tom de Vries  <vries@xxxxxxxxxxxxxxxx>
-            Maxim Kuvyrkov  <maxim@xxxxxxxxxxxxxxxx>
-
-        * sysdeps/mips/bits/atomic.h [__GNUC_PREREQ (4, 8)]
-        (__arch_compare_and_exchange_bool_32_int)
-        (__arch_compare_and_exchange_val_32_int)
-        (__arch_compare_and_exchange_bool_64_int)
-        (__arch_compare_and_exchange_val_64_int)
-        Define in terms of __atomic_compare_exchange_n.
-        [__GNUC_PREREQ (4, 8)]
-        (__arch_exchange_32_int, __arch_exchange_64_int):
-        Define in terms of __atomic_exchange_n.
-        [__GNUC_PREREQ (4, 8)]
-        (__arch_exchange_and_add_32_int, __arch_exchange_and_add_64_int):
-        Define in terms of __atomic_fetch_add.
-        [!__GNUC_PREREQ (4, 8)]: Update formatting.
+	    Maxim Kuvyrkov  <maxim@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/mips/bits/atomic.h [__GNUC_PREREQ (4, 8)]
+	(__arch_compare_and_exchange_bool_32_int)
+	(__arch_compare_and_exchange_val_32_int)
+	(__arch_compare_and_exchange_bool_64_int)
+	(__arch_compare_and_exchange_val_64_int)
+	Define in terms of __atomic_compare_exchange_n.
+	[__GNUC_PREREQ (4, 8)]
+	(__arch_exchange_32_int, __arch_exchange_64_int):
+	Define in terms of __atomic_exchange_n.
+	[__GNUC_PREREQ (4, 8)]
+	(__arch_exchange_and_add_32_int, __arch_exchange_and_add_64_int):
+	Define in terms of __atomic_fetch_add.
+	[!__GNUC_PREREQ (4, 8)]: Update formatting.
 
 2012-07-06  Petar Jovanovic  <petar.jovanovic@xxxxxxxxx>
 

Modified: fsf/trunk/libc/ports/ChangeLog.tile
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.tile (original)
+++ fsf/trunk/libc/ports/ChangeLog.tile Thu May 30 00:02:08 2013
@@ -1,3 +1,9 @@
+2013-05-29  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	[BZ #15465]
+	* sysdeps/tile/dl-machine.h (elf_machine_rela): Use
+	RTLD_PROGNAME.
+
 2013-05-23  Chris Metcalf  <cmetcalf@xxxxxxxxxx>
 
 	* sysdeps/tile/tilegx/Makefile ($(cflags-mcmodel-large)):

Modified: fsf/trunk/libc/ports/sysdeps/aarch64/dl-machine.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/aarch64/dl-machine.h (original)
+++ fsf/trunk/libc/ports/sysdeps/aarch64/dl-machine.h Thu May 30 00:02:08 2013
@@ -257,8 +257,7 @@
 	      strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
 	      _dl_error_printf ("\
 %s: Symbol `%s' has different size in shared object, consider re-linking\n",
-				rtld_progname ?: "<program name unknown>",
-				strtab + refsym->st_name);
+				RTLD_PROGNAME, strtab + refsym->st_name);
 	    }
 	  memcpy (reloc_addr_arg, (void *) value,
 		  MIN (sym->st_size, refsym->st_size));

Modified: fsf/trunk/libc/ports/sysdeps/arm/dl-machine.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/dl-machine.h (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/dl-machine.h Thu May 30 00:02:08 2013
@@ -398,8 +398,7 @@
 	      strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
 	      _dl_error_printf ("\
 %s: Symbol `%s' has different size in shared object, consider re-linking\n",
-				rtld_progname ?: "<program name unknown>",
-				strtab + refsym->st_name);
+				RTLD_PROGNAME, strtab + refsym->st_name);
 	    }
 	  memcpy (reloc_addr_arg, (void *) value,
 		  MIN (sym->st_size, refsym->st_size));
@@ -560,8 +559,7 @@
 	      strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
 	      _dl_error_printf ("\
 %s: Symbol `%s' has different size in shared object, consider re-linking\n",
-				rtld_progname ?: "<program name unknown>",
-				strtab + refsym->st_name);
+				RTLD_PROGNAME, strtab + refsym->st_name);
 	    }
 	  memcpy (reloc_addr_arg, (void *) value,
 		  MIN (sym->st_size, refsym->st_size));

Modified: fsf/trunk/libc/ports/sysdeps/hppa/dl-machine.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/hppa/dl-machine.h (original)
+++ fsf/trunk/libc/ports/sysdeps/hppa/dl-machine.h Thu May 30 00:02:08 2013
@@ -673,8 +673,7 @@
 	  strtab = (const char *) D_PTR (map, l_info[DT_STRTAB]);
 	  _dl_error_printf ("%s: Symbol `%s' has different size in shared object, "
 			    "consider re-linking\n",
-			    rtld_progname ?: "<program name unknown>",
-			    strtab + refsym->st_name);
+			    RTLD_PROGNAME, strtab + refsym->st_name);
 	}
       memcpy (reloc_addr_arg, (void *) value,
 	      MIN (sym->st_size, refsym->st_size));
@@ -730,7 +729,7 @@
   if (ELF32_R_SYM (reloc->r_info) != 0){
     _dl_error_printf ("%s: In elf_machine_rela_relative "
 		      "ELF32_R_SYM (reloc->r_info) != 0. Aborting.",
-		      rtld_progname ?: "<program name unknown>");
+		      RTLD_PROGNAME);
     ABORT_INSTRUCTION;  /* Crash. */
   }
 

Modified: fsf/trunk/libc/ports/sysdeps/m68k/dl-machine.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/m68k/dl-machine.h (original)
+++ fsf/trunk/libc/ports/sysdeps/m68k/dl-machine.h Thu May 30 00:02:08 2013
@@ -238,8 +238,7 @@
 	      strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
 	      _dl_error_printf ("\
 %s: Symbol `%s' has different size in shared object, consider re-linking\n",
-				rtld_progname ?: "<program name unknown>",
-				strtab + refsym->st_name);
+				RTLD_PROGNAME, strtab + refsym->st_name);
 	    }
 	  memcpy (reloc_addr_arg, (void *) value,
 		  MIN (sym->st_size, refsym->st_size));

Modified: fsf/trunk/libc/ports/sysdeps/microblaze/dl-machine.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/microblaze/dl-machine.h (original)
+++ fsf/trunk/libc/ports/sysdeps/microblaze/dl-machine.h Thu May 30 00:02:08 2013
@@ -240,8 +240,7 @@
 	      strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
 	      _dl_error_printf ("\
 %s: Symbol `%s' has different size in shared object, consider re-linking\n",
-				rtld_progname ?: "<program name unknown>",
-				strtab + refsym->st_name);
+				RTLD_PROGNAME, strtab + refsym->st_name);
 	    }
 	  memcpy (reloc_addr_arg, (void *) value,
 		  MIN (sym->st_size, refsym->st_size));

Modified: fsf/trunk/libc/ports/sysdeps/mips/dl-lookup.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/mips/dl-lookup.c (original)
+++ fsf/trunk/libc/ports/sysdeps/mips/dl-lookup.c Thu May 30 00:02:08 2013
@@ -114,7 +114,7 @@
       if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS, 0))
 	_dl_debug_printf ("symbol=%s;  lookup in file=%s [%lu]\n",
 			  undef_name,
-			  map->l_name[0] ? map->l_name : rtld_progname,
+			  DSO_FILENAME (map->l_name),
 			  map->l_ns);
 
       /* If the hash table is empty there is nothing to do here.  */
@@ -684,10 +684,9 @@
       if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
 	_dl_debug_printf ("\
 \nfile=%s [%lu];  needed by %s [%lu] (relocation dependency)\n\n",
-			  map->l_name[0] ? map->l_name : rtld_progname,
+			  DSO_FILENAME (map->l_name),
 			  map->l_ns,
-			  undef_map->l_name[0]
-			  ? undef_map->l_name : rtld_progname,
+			  DSO_FILENAME (undef_map->l_name),
 			  undef_map->l_ns);
     }
   else
@@ -768,9 +767,7 @@
 	  const char *reference_name = undef_map ? undef_map->l_name : NULL;
 
 	  /* XXX We cannot translate the message.  */
-	  _dl_signal_cerror (0, (reference_name[0]
-				 ? reference_name
-				 : (rtld_progname ?: "<main program>")),
+	  _dl_signal_cerror (0, DSO_FILENAME (reference_name),
 			     N_("relocation error"),
 			     make_string ("symbol ", undef_name, ", version ",
 					  version->name,
@@ -797,9 +794,7 @@
 				     ? version->name : "");
 
 	  /* XXX We cannot translate the message.  */
-	  _dl_signal_cerror (0, (reference_name[0]
-				 ? reference_name
-				 : (rtld_progname ?: "<main program>")),
+	  _dl_signal_cerror (0, DSO_FILENAME (reference_name),
 			     N_("symbol lookup error"),
 			     make_string (undefined_msg, undef_name,
 					  versionstr, versionname));
@@ -929,11 +924,9 @@
   if (GLRO(dl_debug_mask) & DL_DEBUG_BINDINGS)
     {
       _dl_debug_printf ("binding file %s [%lu] to %s [%lu]: %s symbol `%s'",
-			(reference_name[0]
-			 ? reference_name
-			 : (rtld_progname ?: "<main program>")),
+			DSO_FILENAME (reference_name),
 			undef_map->l_ns,
-			value->m->l_name[0] ? value->m->l_name : rtld_progname,
+			DSO_FILENAME (value->m->l_name),
 			value->m->l_ns,
 			protected ? "protected" : "normal", undef_name);
       if (version)

Modified: fsf/trunk/libc/ports/sysdeps/mips/dl-machine.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/mips/dl-machine.h (original)
+++ fsf/trunk/libc/ports/sysdeps/mips/dl-machine.h Thu May 30 00:02:08 2013
@@ -635,8 +635,7 @@
 	    strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
 	    _dl_error_printf ("\
   %s: Symbol `%s' has different size in shared object, consider re-linking\n",
-			      rtld_progname ?: "<program name unknown>",
-			      strtab + refsym->st_name);
+			      RTLD_PROGNAME, strtab + refsym->st_name);
 	  }
 	memcpy (reloc_addr, (void *) value,
 		MIN (sym->st_size, refsym->st_size));

Modified: fsf/trunk/libc/ports/sysdeps/tile/dl-machine.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/tile/dl-machine.h (original)
+++ fsf/trunk/libc/ports/sysdeps/tile/dl-machine.h Thu May 30 00:02:08 2013
@@ -624,8 +624,7 @@
           strtab = (const char *) D_PTR (map,l_info[DT_STRTAB]);
           _dl_error_printf ("%s: Symbol `%s' has different size in shared"
                             " object, consider re-linking\n",
-                            rtld_progname ?: "<program name unknown>",
-                            strtab + refsym->st_name);
+                            RTLD_PROGNAME, strtab + refsym->st_name);
         }
       memcpy (reloc_addr_arg, (void *) value,
               MIN (sym->st_size, refsym->st_size));

Modified: fsf/trunk/libc/sysdeps/generic/ldsodefs.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/ldsodefs.h (original)
+++ fsf/trunk/libc/sysdeps/generic/ldsodefs.h Thu May 30 00:02:08 2013
@@ -128,6 +128,11 @@
    | ((PROT_WRITE | PROT_EXEC) << (PF_W | PF_X) * 4)			      \
    | ((PROT_READ | PROT_WRITE | PROT_EXEC) << ((PF_R | PF_W | PF_X) * 4)))
 
+/* The filename itself, or the main program name, if available.  */
+#define DSO_FILENAME(name) ((name)[0] ? (name)				      \
+			    : (rtld_progname ?: "<main program>"))
+
+#define RTLD_PROGNAME (rtld_progname ?: "<program name unknown>")
 
 /* For the version handling we need an array with only names and their
    hash values.  */

Modified: fsf/trunk/libc/sysdeps/i386/dl-machine.h
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/dl-machine.h (original)
+++ fsf/trunk/libc/sysdeps/i386/dl-machine.h Thu May 30 00:02:08 2013
@@ -464,8 +464,7 @@
 	      strtab = (const char *) D_PTR (map, l_info[DT_STRTAB]);
 	      _dl_error_printf ("\
 %s: Symbol `%s' has different size in shared object, consider re-linking\n",
-				rtld_progname ?: "<program name unknown>",
-				strtab + refsym->st_name);
+				RTLD_PROGNAME, strtab + refsym->st_name);
 	    }
 	  memcpy (reloc_addr_arg, (void *) value,
 		  MIN (sym->st_size, refsym->st_size));
@@ -610,8 +609,7 @@
 	      strtab = (const char *) D_PTR (map, l_info[DT_STRTAB]);
 	      _dl_error_printf ("\
 %s: Symbol `%s' has different size in shared object, consider re-linking\n",
-				rtld_progname ?: "<program name unknown>",
-				strtab + refsym->st_name);
+				RTLD_PROGNAME, strtab + refsym->st_name);
 	    }
 	  memcpy (reloc_addr_arg, (void *) value,
 		  MIN (sym->st_size, refsym->st_size));

Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc32/dl-machine.c
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc32/dl-machine.c (original)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc32/dl-machine.c Thu May 30 00:02:08 2013
@@ -510,8 +510,7 @@
 	  strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
 	  _dl_error_printf ("\
 %s: Symbol `%s' has different size in shared object, consider re-linking\n",
-			    rtld_progname ?: "<program name unknown>",
-			    strtab + refsym->st_name);
+			    RTLD_PROGNAME, strtab + refsym->st_name);
 	}
       memcpy (reloc_addr, (char *) finaladdr, MIN (sym->st_size,
 						   refsym->st_size));

Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc64/dl-machine.h
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc64/dl-machine.h (original)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc64/dl-machine.h Thu May 30 00:02:08 2013
@@ -734,8 +734,7 @@
 	  _dl_error_printf ("%s: Symbol `%s' has different size" \
 			    " in shared object," \
 			    " consider re-linking\n",
-			    rtld_progname ?: "<program name unknown>",
-			    strtab + refsym->st_name);
+			    RTLD_PROGNAME, strtab + refsym->st_name);
 	}
       memcpy (reloc_addr_arg, (char *) value,
 	      MIN (sym->st_size, refsym->st_size));

Modified: fsf/trunk/libc/sysdeps/s390/s390-32/dl-machine.h
==============================================================================
--- fsf/trunk/libc/sysdeps/s390/s390-32/dl-machine.h (original)
+++ fsf/trunk/libc/sysdeps/s390/s390-32/dl-machine.h Thu May 30 00:02:08 2013
@@ -383,8 +383,7 @@
 	      strtab = (const char *) D_PTR(map,l_info[DT_STRTAB]);
 	      _dl_error_printf ("\
 %s: Symbol `%s' has different size in shared object, consider re-linking\n",
-				rtld_progname ?: "<program name unknown>",
-				strtab + refsym->st_name);
+				RTLD_PROGNAME, strtab + refsym->st_name);
 	    }
 	  memcpy (reloc_addr_arg, (void *) value,
 		  MIN (sym->st_size, refsym->st_size));

Modified: fsf/trunk/libc/sysdeps/s390/s390-64/dl-machine.h
==============================================================================
--- fsf/trunk/libc/sysdeps/s390/s390-64/dl-machine.h (original)
+++ fsf/trunk/libc/sysdeps/s390/s390-64/dl-machine.h Thu May 30 00:02:08 2013
@@ -361,8 +361,7 @@
 	      strtab = (const char *) D_PTR (map,l_info[DT_STRTAB]);
 	      _dl_error_printf ("\
 %s: Symbol `%s' has different size in shared object, consider re-linking\n",
-				rtld_progname ?: "<program name unknown>",
-				strtab + refsym->st_name);
+				RTLD_PROGNAME, strtab + refsym->st_name);
 	    }
 	  memcpy (reloc_addr_arg, (void *) value,
 		  MIN (sym->st_size, refsym->st_size));

Modified: fsf/trunk/libc/sysdeps/sh/dl-machine.h
==============================================================================
--- fsf/trunk/libc/sysdeps/sh/dl-machine.h (original)
+++ fsf/trunk/libc/sysdeps/sh/dl-machine.h Thu May 30 00:02:08 2013
@@ -336,8 +336,7 @@
 	      strtab = (const char *) D_PTR (map, l_info[DT_STRTAB]);
 	      _dl_error_printf ("\
 %s: Symbol `%s' has different size in shared object, consider re-linking\n",
-				rtld_progname ?: "<program name unknown>",
-				strtab + refsym->st_name);
+				RTLD_PROGNAME, strtab + refsym->st_name);
 	    }
 	  memcpy (reloc_addr_arg, (void *) value,
 		  MIN (sym->st_size, refsym->st_size));

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/dl-machine.h
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/dl-machine.h (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/dl-machine.h Thu May 30 00:02:08 2013
@@ -411,8 +411,7 @@
 	  strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
 	  _dl_error_printf ("\
 %s: Symbol `%s' has different size in shared object, consider re-linking\n",
-			    rtld_progname ?: "<program name unknown>",
-			    strtab + refsym->st_name);
+			    RTLD_PROGNAME, strtab + refsym->st_name);
 	}
       memcpy (reloc_addr_arg, (void *) value,
 	      MIN (sym->st_size, refsym->st_size));

Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/dl-machine.h
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/dl-machine.h (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/dl-machine.h Thu May 30 00:02:08 2013
@@ -436,8 +436,7 @@
 	  strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
 	  _dl_error_printf ("\
 %s: Symbol `%s' has different size in shared object, consider re-linking\n",
-			    rtld_progname ?: "<program name unknown>",
-			    strtab + refsym->st_name);
+			    RTLD_PROGNAME, strtab + refsym->st_name);
 	}
       memcpy (reloc_addr_arg, (void *) value,
 	      MIN (sym->st_size, refsym->st_size));

Modified: fsf/trunk/libc/sysdeps/x86_64/dl-machine.h
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/dl-machine.h (original)
+++ fsf/trunk/libc/sysdeps/x86_64/dl-machine.h Thu May 30 00:02:08 2013
@@ -430,9 +430,7 @@
 #  endif
 	      strtab = (const char *) D_PTR (map, l_info[DT_STRTAB]);
 
-	      _dl_error_printf (fmt,
-				rtld_progname ?: "<program name unknown>",
-				strtab + refsym->st_name);
+	      _dl_error_printf (fmt, RTLD_PROGNAME, strtab + refsym->st_name);
 	    }
 	  break;
 #  ifndef RESOLVE_CONFLICT_FIND_MAP

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits