refJava = os.getObjectRef(sbcClass.getMethod("arrayStoreWriteBarrier", "(Ljava/lang/Object;ILjava/lang/Object;)V")); os.getObjectRef(new Label("SoftByteCodes_arrayStoreWriteBarrier")).link(refJava);   refJava = os.getObjectRef(sbcClass.getMethod("putfieldWriteBarrier", "(Ljava/lang/Object;ILjava/lang/Object;)V")); os.getObjectRef(new Label("SoftByteCodes_putfieldWriteBarrier")).link(refJava);   refJava = os.getObjectRef(sbcClass.getMethod("putstaticWriteBarrier", "(ILjava/lang/Object;)V")); os.getObjectRef(new Label("SoftByteCodes_putstaticWriteBarrier")).link(refJava);  VmType vmThreadClass = loadClass(VmThread.class);
final VmType vmThreadClass = loadClass(VmThread.class);
	protected void linkNativeSymbols(NativeStream os) throws ClassNotFoundException, UnresolvedObjectRefException {		NativeStream.ObjectRef refJava;		/* Link VmMethod_compile */		VmType vmMethodClass = loadClass(VmMethod.class);		refJava = os.getObjectRef(vmMethodClass.getMethod("recompile", "()V"));		os.getObjectRef(new Label("VmMethod_recompile")).link(refJava);		/* Link VmMethod_Class */		refJava = os.getObjectRef(vmMethodClass);		os.getObjectRef(new Label("VmMethod_Class")).link(refJava);		/* Link SoftByteCodes_systemException */		VmType sbcClass = loadClass(SoftByteCodes.class);		refJava = os.getObjectRef(sbcClass.getMethod("systemException", "(II)Ljava/lang/Throwable;"));		os.getObjectRef(sbcSystemException).link(refJava);		/* Link SoftByteCodes_resolveClass */		refJava = os.getObjectRef(sbcClass.getMethod("resolveClass", "(Lorg/jnode/vm/classmgr/VmConstClass;)Lorg/jnode/vm/classmgr/VmType;"));		os.getObjectRef(new Label("SoftByteCodes_resolveClass")).link(refJava);		/* Link SoftByteCodes_resolveField */		refJava = os.getObjectRef(sbcClass.getMethod("resolveField", "(Lorg/jnode/vm/classmgr/VmMethod;Lorg/jnode/vm/classmgr/VmConstFieldRef;Z)Lorg/jnode/vm/classmgr/VmField;"));		os.getObjectRef(new Label("SoftByteCodes_resolveField")).link(refJava);		/* Link SoftByteCodes_resolveMethod */		refJava =			os.getObjectRef(sbcClass.getMethod("resolveMethod", "(Lorg/jnode/vm/classmgr/VmMethod;Lorg/jnode/vm/classmgr/VmConstMethodRef;)Lorg/jnode/vm/classmgr/VmMethod;"));		os.getObjectRef(new Label("SoftByteCodes_resolveMethod")).link(refJava);		/* Link SoftByteCodes_allocArray */		refJava = os.getObjectRef(sbcClass.getMethod("allocArray", "(Lorg/jnode/vm/classmgr/VmType;I)Ljava/lang/Object;"));		os.getObjectRef(new Label("SoftByteCodes_allocArray")).link(refJava);		/* Link SoftByteCodes_allocMultiArray */		refJava = os.getObjectRef(sbcClass.getMethod("allocMultiArray", "(Lorg/jnode/vm/classmgr/VmType;[I)Ljava/lang/Object;"));		os.getObjectRef(new Label("SoftByteCodes_allocMultiArray")).link(refJava);		/* Link SoftByteCodes_allocObject */		refJava = os.getObjectRef(sbcClass.getMethod("allocObject", "(Lorg/jnode/vm/classmgr/VmType;I)Ljava/lang/Object;"));		os.getObjectRef(new Label("SoftByteCodes_allocObject")).link(refJava);		/* Link SoftByteCodes_allocPrimitiveArray */		refJava = os.getObjectRef(sbcClass.getMethod("allocPrimitiveArray", "(II)Ljava/lang/Object;"));		os.getObjectRef(new Label("SoftByteCodes_allocPrimitiveArray")).link(refJava);		/* Link SoftByteCodes_anewarray */		refJava = os.getObjectRef(sbcClass.getMethod("anewarray", "(Lorg/jnode/vm/classmgr/VmMethod;Lorg/jnode/vm/classmgr/VmType;I)Ljava/lang/Object;"));		os.getObjectRef(new Label("SoftByteCodes_anewarray")).link(refJava);		/* Link SoftByteCodes_unknownOpcode */		refJava = os.getObjectRef(sbcClass.getMethod("unknownOpcode", "(II)V"));		os.getObjectRef(new Label("SoftByteCodes_unknownOpcode")).link(refJava);		/* Link SoftByteCodes_arrayStoreWriteBarrier */		refJava = os.getObjectRef(sbcClass.getMethod("arrayStoreWriteBarrier", "(Ljava/lang/Object;ILjava/lang/Object;)V"));		os.getObjectRef(new Label("SoftByteCodes_arrayStoreWriteBarrier")).link(refJava);		/* Link SoftByteCodes_putfieldWriteBarrier */		refJava = os.getObjectRef(sbcClass.getMethod("putfieldWriteBarrier", "(Ljava/lang/Object;ILjava/lang/Object;)V"));		os.getObjectRef(new Label("SoftByteCodes_putfieldWriteBarrier")).link(refJava);		/* Link SoftByteCodes_putstaticWriteBarrier */		refJava = os.getObjectRef(sbcClass.getMethod("putstaticWriteBarrier", "(ILjava/lang/Object;)V"));		os.getObjectRef(new Label("SoftByteCodes_putstaticWriteBarrier")).link(refJava);		VmType vmThreadClass = loadClass(VmThread.class);		/* Link VmThread_runThread */		refJava = os.getObjectRef(vmThreadClass.getMethod("runThread", "(Lorg/jnode/vm/VmThread;)V"));		os.getObjectRef(vmThreadRunThread).link(refJava);		/* Link VmProcessor_reschedule */		VmType vmProcClass = loadClass(VmProcessor.class);		refJava = os.getObjectRef(vmProcClass.getMethod("reschedule", "()V"));		os.getObjectRef(vmReschedule).link(refJava);		/* Link vmCurProcessor */		refJava = os.getObjectRef(processor);		os.getObjectRef(vmCurProcessor).link(refJava);		/* Set statics index of VmSystem_currentTimeMillis */		final VmType vmSystemClass = loadClass(VmSystem.class);		final int staticsIdx = ((VmStaticField) vmSystemClass.getField("currentTimeMillis")).getStaticsIndex();		final X86Stream os86 = (X86Stream)os;		os86.set32(os.getObjectRef(new Label("currentTimeMillisStaticsIdx")).getOffset(), staticsIdx);		/* Link vm_findThrowableHandler */		refJava = os.getObjectRef(vmSystemClass.getMethod("findThrowableHandler", "(Ljava/lang/Throwable;Lorg/jnode/vm/Address;Lorg/jnode/vm/Address;)Lorg/jnode/vm/Address;"));		os.getObjectRef(vmFindThrowableHandler).link(refJava);		/* Link MonitorManager_monitorEnter */		VmType monMgrClass = loadClass(MonitorManager.class);		refJava = os.getObjectRef(monMgrClass.getMethod("monitorEnter", "(Ljava/lang/Object;)V"));		os.getObjectRef(new Label("MonitorManager_monitorEnter")).link(refJava);		/* Link MonitorManager_monitorExit */		refJava = os.getObjectRef(monMgrClass.getMethod("monitorExit", "(Ljava/lang/Object;)V"));		os.getObjectRef(new Label("MonitorManager_monitorExit")).link(refJava);		/* Link MathSupport_ldiv */		VmType mathSupportClass = loadClass(MathSupport.class);		refJava = os.getObjectRef(mathSupportClass.getMethod("ldiv", "(JJ)J"));		os.getObjectRef(new Label("MathSupport_ldiv")).link(refJava);		/* Link MathSupport_lrem */		refJava = os.getObjectRef(mathSupportClass.getMethod("lrem", "(JJ)J"));		os.getObjectRef(new Label("MathSupport_lrem")).link(refJava);		// Link Luser_esp		refJava = os.getObjectRef(initialStackPtr);		os.getObjectRef(new Label("Luser_esp")).link(refJava);		// Link freeMemoryStart		refJava = os.getObjectRef(imageEnd);		os.getObjectRef(new Label("freeMemoryStart")).link(refJava);		// Link bootHeapStart		refJava = os.getObjectRef(bootHeapStart);		os.getObjectRef(new Label("bootHeapStart")).link(refJava);		// Link bootHeapEnd		refJava = os.getObjectRef(bootHeapEnd);		os.getObjectRef(new Label("bootHeapEnd")).link(refJava);	}