This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] rtld.c: do_preload(): print the reason why preloading failed


hi all, the error message for LD_PRELOAD failure could trivially be
improved to be more helpful, please see attached patch.

note that i don't have any copyright assignment currently, hope it's not
needed for such a trivial patch.

ChangeLog:

2013-10-07  Michael Stahl    <mstahl@redhat.com>

* elf/rtld.c: do_preload(): print the reason why preloading failed
>From 0099055c5ba62b97a0d48aa0d5cab33323f58dea Mon Sep 17 00:00:00 2001
From: Michael Stahl <mstahl@redhat.com>
Date: Mon, 7 Oct 2013 00:42:04 +0200
Subject: [PATCH] rtld.c: do_preload(): print the reason why preloading failed

---
 elf/rtld.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/elf/rtld.c b/elf/rtld.c
index 91da88c..51682f2 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -816,8 +816,8 @@ do_preload (char *fname, struct link_map *main_map, const char *where)
   if (__builtin_expect (err_str != NULL, 0))
     {
       _dl_error_printf ("\
-ERROR: ld.so: object '%s' from %s cannot be preloaded: ignored.\n",
-			fname, where);
+ERROR: ld.so: object '%s' from %s cannot be preloaded (%s): ignored.\n",
+			fname, where, err_str);
       /* No need to call free, this is still before
 	 the libc's malloc is used.  */
     }
-- 
1.8.3.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]