protected final void printLabels(NativeStream os, VmType[] bootClasses) throws BuildException, UnresolvedObjectRefException {
protected final void printLabels(NativeStream os, VmType[] bootClasses, VmStatics statics) throws BuildException, UnresolvedObjectRefException {
	protected final void printLabels(NativeStream os, VmType[] bootClasses) throws BuildException, UnresolvedObjectRefException {		try {			int unresolvedCount = 0;			final PrintWriter w = new PrintWriter(new FileWriter(listFile));			// Print a list of boot classes.			for (int i = 0; i < bootClasses.length; i++) {				final VmType vmClass = bootClasses[i];				w.print("bootclass ");				w.print(i);				w.print(": ");				w.print(vmClass.getName());				if (vmClass instanceof VmClassType) {					final int cnt = ((VmClassType) vmClass).getInstanceCount();					if (cnt > 0) {						w.print(", ");						w.print(cnt);						w.print(" instances");					}				}				int cnt = vmClass.getNoInterfaces();				if (cnt > 0) {					w.print(", ");					w.print(cnt);					w.print(" interfaces");				}				w.print(vmClass.isInitialized() ? "" : ", not initialized");				w.println();			}			w.println();			// Look for unresolved labels and put all resolved			// label into the sorted map. This will be used later			// to print to the listing file.			final Collection xrefs = os.getObjectRefs();			final SortedMap map = new TreeMap();			for (Iterator i = xrefs.iterator(); i.hasNext();) {				NativeStream.ObjectRef ref;				ref = (NativeStream.ObjectRef) i.next();				if (!ref.isResolved()) {					StringBuffer buf = new StringBuffer();					buf.append("  $" + Integer.toHexString(ref.getOffset()));					buf.append("\t" + ref.getObject());					System.err.println("Unresolved label " + buf.toString());					unresolvedCount++;				} else {					map.put(new Integer(ref.getOffset()), ref);				}			}			if (unresolvedCount > 0) {				throw new BuildException("There are " + unresolvedCount + " unresolved labels");			} // Print the listing file.			for (Iterator i = map.values().iterator(); i.hasNext();) {				final NativeStream.ObjectRef ref;				ref = (NativeStream.ObjectRef) i.next();				final Object object = ref.getObject();				w.print('$');				w.print(hex(ref.getOffset() + os.getBaseAddr()));				w.print('\t');				w.print(object);				w.print(" (");				if (object instanceof VmSystemObject) {					final String info = ((VmSystemObject) object).getExtraInfo();					if (info != null) {						w.print(info);						w.print(", ");					}				}				w.print(object.getClass().getName());				w.println(')');			}			w.close();		} catch (IOException ex) {			throw new BuildException("Writing list", ex);		}	}