1 2 /* Code for module to be loaded by test63. */ 3 4 #include <stdlib.h> 5 #include <stdio.h> 6 #include <dlfcn.h> 7 8 #include "magic.h" 9 10 long cookie = 0; 11 12 void exithandler(void); 13 modfunction(long v1,long * argcookie,long v2)14long modfunction(long v1, long *argcookie, long v2) { 15 if(v1 != MAGIC4 || v2 != MAGIC5) { 16 fprintf(stderr, "wrong args to modfunction\n"); 17 exit(1); 18 } 19 *argcookie = MAGIC3; 20 cookie = MAGIC2; 21 return MAGIC1; 22 } 23 exithandler(void)24void exithandler(void) { 25 /* OK */ 26 } 27