try { callOnLoad(); } catch (UnsatisfiedLinkError e) { unload(); throw e; }
  private VM_DynamicLibrary(String libraryName) {    // Convert file name from unicode to filesystem character set.    // (Assume file name is ASCII, for now).    //    byte[] asciiName = new byte[libraryName.length() + 1]; // +1 for null terminator    libraryName.getBytes(0, libraryName.length(), asciiName, 0);    // make sure we have enough stack to load the library.      // This operation has been known to require more than 20K of stack.    VM_Thread myThread = VM_Thread.getCurrentThread();    Offset remaining = VM_Magic.getFramePointer().diff(myThread.stackLimit);    int stackNeededInBytes = VM_StackframeLayoutConstants.STACK_SIZE_DLOPEN - remaining.toInt();    if (stackNeededInBytes > 0) {      if (myThread.hasNativeStackFrame()) {        throw new java.lang.StackOverflowError("dlopen");      } else {        VM_Thread.resizeCurrentStack(myThread.stack.length + stackNeededInBytes, null);       }    }    libHandler = VM_SysCall.sysDlopen(asciiName);    if (libHandler.isZero()) {      VM.sysWriteln("error loading library: " + libraryName);      throw new UnsatisfiedLinkError();    }    libName = libraryName;    if (VM.verboseJNI) {      VM.sysWriteln("[Loaded native library: "+libName+"]");    }  }