Index: linkers/rtld-base.ini
===================================================================
--- linkers/rtld-base.ini	(revision 5afb2b8d5bce8d03e9aef4666555c86831808c44)
+++ linkers/rtld-base.ini	(revision 7168ab3da54950809ea579e37afff4e18454ad5c)
@@ -16,18 +16,18 @@
 [printf-generator]
 headers = printf-generator-headers
-entry-trace = "rtld_pg_print_entry(@FUNC_NAME@, (void*) &@FUNC_LABEL@);"
-arg-trace = "rtld_pg_print_arg(@ARG_NUM@, @ARG_TYPE@, @ARG_SIZE@, (void*) &@ARG_LABEL@);"
-exit-trace = "rtld_pg_print_exit(@FUNC_NAME@, (void*) &@FUNC_LABEL@);"
-ret-trace = "rtld_pg_print_ret(@RET_TYPE@, @RET_SIZE@, (void*) &@RET_LABEL@);"
+entry-trace = "rtld_pg_printf_entry(@FUNC_NAME@, (void*) &@FUNC_LABEL@);"
+arg-trace = "rtld_pg_printf_arg(@ARG_NUM@, @ARG_TYPE@, @ARG_SIZE@, (void*) &@ARG_LABEL@);"
+exit-trace = "rtld_pg_printf_exit(@FUNC_NAME@, (void*) &@FUNC_LABEL@);"
+ret-trace = "rtld_pg_printf_ret(@RET_TYPE@, @RET_SIZE@, (void*) &@RET_LABEL@);"
 code = <<<CODE
-static inline void rtld_pg_print_entry(const char* func_name,
-                                       void*       func_addr)
+static inline void rtld_pg_printf_entry(const char* func_name,
+                                        void*       func_addr)
 {
   printf (" >> %s (0x%08x)\n", func_name, func_addr);
 }
-static inline void rtld_pg_print_arg(int         arg_num,
-                                     const char* arg_type,
-                                     int         arg_size,
-                                     void*       arg)
+static inline void rtld_pg_printf_arg(int         arg_num,
+                                      const char* arg_type,
+                                      int         arg_size,
+                                      void*       arg)
 {
   const unsigned char* p = arg;
@@ -37,12 +37,12 @@
   printf ("\n");
 }
-static inline void rtld_pg_print_exit(const char* func_name,
-                                      void*       func_addr)
+static inline void rtld_pg_printf_exit(const char* func_name,
+                                       void*       func_addr)
 {
   printf (" << %s (0x%08x)\n", func_name, func_addr);
 }
-static inline void rtld_pg_print_ret(const char* ret_type,
-                                     int         ret_size,
-                                     void*       ret)
+static inline void rtld_pg_printf_ret(const char* ret_type,
+                                      int         ret_size,
+                                      void*       ret)
 {
   const unsigned char* p = ret;
@@ -56,2 +56,45 @@
 [printf-generator-headers]
 header = "#include <stdio.h>"
+
+[printk-generator]
+headers = printk-generator-headers
+entry-trace = "rtld_pg_printk_entry(@FUNC_NAME@, (void*) &@FUNC_LABEL@);"
+arg-trace = "rtld_pg_printk_arg(@ARG_NUM@, @ARG_TYPE@, @ARG_SIZE@, (void*) &@ARG_LABEL@);"
+exit-trace = "rtld_pg_printk_exit(@FUNC_NAME@, (void*) &@FUNC_LABEL@);"
+ret-trace = "rtld_pg_printk_ret(@RET_TYPE@, @RET_SIZE@, (void*) &@RET_LABEL@);"
+code = <<<CODE
+static inline void rtld_pg_printk_entry(const char* func_name,
+                                        void*       func_addr)
+{
+  printk (" >> %s (0x%08x)\n", func_name, func_addr);
+}
+static inline void rtld_pg_printk_arg(int         arg_num,
+                                     const char* arg_type,
+                                     int         arg_size,
+                                     void*       arg)
+{
+  const unsigned char* p = arg;
+  int   i;
+  printk (" %2d] %s(%d) = ", arg_num, arg_type, arg_size);
+  for (i = 0; i < arg_size; ++i, ++p) printk ("%02x", (unsigned int) *p);
+  printk ("\n");
+}
+static inline void rtld_pg_printk_exit(const char* func_name,
+                                       void*       func_addr)
+{
+  printk (" << %s (0x%08x)\n", func_name, func_addr);
+}
+static inline void rtld_pg_printk_ret(const char* ret_type,
+                                      int         ret_size,
+                                      void*       ret)
+{
+  const unsigned char* p = ret;
+  int   i;
+  printk (" rt] %s(%d) = ", ret_type, ret_size);
+  for (i = 0; i < ret_size; ++i, ++p) printk ("%02x", (unsigned int) *p);
+  printk ("\n");
+}
+CODE
+
+[printk-generator-headers]
+header = "#include <stdio.h>"
