$ fortran/object=z.obj sys$input
      SUBROUTINE Z
      WRITE(*,*) 'Z CALLED'
      RETURN
      END
$
$ link/share z+sys$input/opt
universal=z
$
$ fortran/object=z1.obj sys$input
      INTEGER*4 S
      WRITE(*,*) 'START'
      CALL LIB$FIND_IMAGE_SYMBOL('Z','Z',S,'SYS$DISK:[].EXE')
      CALL DUMMY(%VAL(S))
      WRITE(*,*) 'FIN'
      END
      SUBROUTINE DUMMY(S)
      EXTERNAL S
      CALL S
      RETURN
      END
$
$ link z1
$ run z1
$ cc/object=z2.obj sys$input
#include <stdio.h>
#include <descrip.h>

int lib$find_image_symbol();

main()
{
   void (*s)();
   $DESCRIPTOR(fnmdes,"Z");
   $DESCRIPTOR(symdes,"Z");
   $DESCRIPTOR(imgdes,"SYS$DISK:[].EXE");
   printf("START\n");
   lib$find_image_symbol(&fnmdes,&symdes,&s,&imgdes);
   s();
   printf("FIN\n");
}
$
$ link z2+sys$input/opt
sys$share:vaxcrtl/share
$        
$ run z2
$ exit
