summary refs log tree commit diff
path: root/version.c
diff options
context:
space:
mode:
Diffstat (limited to 'version.c')
-rw-r--r--version.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/version.c b/version.c
index 3405ed5a68..e62504d2f9 100644
--- a/version.c
+++ b/version.c
@@ -36,6 +36,20 @@ This is free software; see the source for copying conditions.\n\
 There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\
 PARTICULAR PURPOSE.");
 }
+
+#ifdef HAVE_ELF
+/* This function is the entry point for the shared object.
+   Running the library as a program will get here.  */
+
+#include <stdlib.h>
+
+void
+__libc_main (void)
+{
+  __libc_print_version ();
+  exit (0);
+}
+#endif
 
 /*
    Local Variables: