public NativeBootImage(NativeImageKind k, HostedUniverse universe, HostedMetaAccess metaAccess, NativeLibraries nativeLibs, NativeImageHeap heap, NativeImageCodeCache codeCache,
List<HostedMethod> entryPoints, HostedMethod mainEntryPoint, ClassLoader imageClassLoader) {
super(k, universe, metaAccess, nativeLibs, heap, codeCache, entryPoints, imageClassLoader);
uniqueEntryPoints.addAll(entryPoints);
if (NativeImageOptions.MachODebugInfoTesting.getValue()) {
objectFile = new MachOObjectFile();
} else {
objectFile = ObjectFile.getNativeObjectFile();
if (objectFile == null) {
throw new Error("Unsupported objectfile format: " + ObjectFile.getNativeFormat());
}
}
if (mainEntryPoint != null) {
objectFile.setMainEntryPoint(globalSymbolNameForMethod(mainEntryPoint));
}
objectFile.setByteOrder(ConfigurationValues.getTarget().arch.getByteOrder());
int pageSize = NativeImageOptions.PageSize.getValue();
if (pageSize > 0) {
objectFile.setPageSize(pageSize);
}
wordSize = FrameAccess.wordSize();
assert objectFile.getWordSizeInBytes() == wordSize;
}