about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/Versions2
-rw-r--r--elf/dl-misc.c31
2 files changed, 32 insertions, 1 deletions
diff --git a/elf/Versions b/elf/Versions
index 3be879c4ad..be88c48e6d 100644
--- a/elf/Versions
+++ b/elf/Versions
@@ -58,7 +58,7 @@ ld {
     _dl_allocate_tls; _dl_allocate_tls_init;
     _dl_argv; _dl_find_dso_for_object; _dl_get_tls_static_info;
     _dl_deallocate_tls; _dl_make_stack_executable;
-    _dl_rtld_di_serinfo; _dl_starting_up;
+    _dl_rtld_di_serinfo; _dl_starting_up; _dl_fatal_printf;
     _rtld_global; _rtld_global_ro;
 
     # Only here for gdb while a better method is developed.
diff --git a/elf/dl-misc.c b/elf/dl-misc.c
index e6cf247b46..ab70481fda 100644
--- a/elf/dl-misc.c
+++ b/elf/dl-misc.c
@@ -275,6 +275,37 @@ _dl_dprintf (int fd, const char *fmt, ...)
   va_end (arg);
 }
 
+void
+_dl_printf (const char *fmt, ...)
+{
+  va_list arg;
+
+  va_start (arg, fmt);
+  _dl_debug_vdprintf (STDOUT_FILENO, 0, fmt, arg);
+  va_end (arg);
+}
+
+void
+_dl_error_printf (const char *fmt, ...)
+{
+  va_list arg;
+
+  va_start (arg, fmt);
+  _dl_debug_vdprintf (STDERR_FILENO, 0, fmt, arg);
+  va_end (arg);
+}
+
+void
+_dl_fatal_printf (const char *fmt, ...)
+{
+  va_list arg;
+
+  va_start (arg, fmt);
+  _dl_debug_vdprintf (STDERR_FILENO, 0, fmt, arg);
+  va_end (arg);
+  _exit (127);
+}
+rtld_hidden_def (_dl_fatal_printf)
 
 /* Test whether given NAME matches any of the names of the given object.  */
 int