summaryrefslogtreecommitdiff
path: root/quickexec/johns/so_stub.c
Unidiff
Diffstat (limited to 'quickexec/johns/so_stub.c') (more/less context) (ignore whitespace changes)
-rw-r--r--quickexec/johns/so_stub.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/quickexec/johns/so_stub.c b/quickexec/johns/so_stub.c
deleted file mode 100644
index fe71f9c..0000000
--- a/quickexec/johns/so_stub.c
+++ b/dev/null
@@ -1,23 +0,0 @@
1#include <stdio.h>
2#include <string.h>
3#include <dlfcn.h>
4
5
6int main( int argc, char *argv[] ) {
7 char module[1024];
8 int (*loadedMain)( int argc, char *argv[] );
9 char *error;
10 int retVal = 0;
11 void *handle;
12 strcpy( module, argv[0] );
13 strcat( module, ".so" );
14 if ( !(handle = dlopen( module, RTLD_LAZY ) ) )
15 fputs( dlerror(), stderr ), exit( 1 );
16 loadedMain = dlsym( handle, "main" );
17 if ( ( error = dlerror() ) != NULL )
18 fputs( error, stderr ), exit( 1 );
19 retVal = (*loadedMain)( argc, argv );
20 dlclose( handle );
21 return retVal;
22}
23