Module Name:    src
Committed By:   christos
Date:           Sat Jan 12 18:58:10 UTC 2019

Modified Files:
        src/libexec/ld.elf_so: search.c

Log Message:
print the program name when we don't find a library.
XXX: really most _rtld_error() should do that, and most do.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/libexec/ld.elf_so/search.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/ld.elf_so/search.c
diff -u src/libexec/ld.elf_so/search.c:1.24 src/libexec/ld.elf_so/search.c:1.25
--- src/libexec/ld.elf_so/search.c:1.24	Mon May  6 04:02:20 2013
+++ src/libexec/ld.elf_so/search.c	Sat Jan 12 13:58:10 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: search.c,v 1.24 2013/05/06 08:02:20 skrll Exp $	 */
+/*	$NetBSD: search.c,v 1.25 2019/01/12 18:58:10 christos Exp $	 */
 
 /*
  * Copyright 1996 Matt Thomas <[email protected]>
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: search.c,v 1.24 2013/05/06 08:02:20 skrll Exp $");
+__RCSID("$NetBSD: search.c,v 1.25 2019/01/12 18:58:10 christos Exp $");
 #endif /* not lint */
 
 #include <err.h>
@@ -117,6 +117,7 @@ _rtld_search_library_path(const char *na
 Obj_Entry *
 _rtld_load_library(const char *name, const Obj_Entry *refobj, int flags)
 {
+	extern char *__progname;
 	char tmperror[512], *tmperrorp;
 	Search_Path *sp;
 	const char *pathname;
@@ -159,7 +160,8 @@ _rtld_load_library(const char *name, con
 		    sp->sp_path, sp->sp_pathlen, flags)) != NULL)
 			goto pathfound;
 
-	_rtld_error("Shared object \"%s\" not found", name);
+	_rtld_error("%s: Shared object \"%s\" not found",
+	    refobj ? refobj->path : __progname, name);
 	return NULL;
 
 pathfound:

Reply via email to