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]

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


On Sat, Oct 12, 2013 at 02:34:30PM +0200, Michael Stahl wrote:
> 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.
> 
As this is trivial I commited it with minor changelog correction.


diff --git a/ChangeLog b/ChangeLog
index 0cb5ada..8605310 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-19  Michael Stahl  <mstahl@redhat.com>
+
+	* elf/rtld.c (do_preload): Print the reason why preloading failed.
+
 2013-10-19  OndÅej BÃlka  <neleai@seznam.cz>
 
 	BZ #10278]
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.  */
     }


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