@Override
	protected void build() throws Exception {

		// We want to handle the start of the Mach-O normally.  It represents the System.kext.
		super.build();

		// Now process the inner Mach-O's.  Newer formats use LC_FILESET_ENTRY.  Older formats
		// require scanning and XML parsing.
		List<MachoInfo> machoInfoList = processPrelinkFileSet();
		if (machoInfoList.isEmpty()) {
			machoInfoList = processPrelinkXml();
		}
		monitor.initialize(machoInfoList.size());
		for (MachoInfo info : machoInfoList) {
			info.processMemoryBlocks();
			info.markupHeaders();
			info.markupLoadCommandData();
			info.addToProgramTree();
			monitor.incrementProgress(1);
		}

		// Remove empty entries from Program Tree
		ProgramModule rootModule = listing.getDefaultRootModule();
		for (Group group : rootModule.getChildren()) {
			if (group instanceof ProgramFragment) {
				ProgramFragment fragment = (ProgramFragment) group;
				if (fragment.isEmpty()) {
					rootModule.removeChild(fragment.getName());
				}
			}
		}

		// Do things that needed to wait until after the inner Mach-O's are processed
		super.markupChainedFixups(machoHeader, chainedFixups);
	}
Builds up a PRELINK Mach-O {@link Program}.

@param program The {@link Program} to build up.
@param provider The {@link ByteProvider} that contains the Mach-O's bytes.
@param fileBytes Where the Mach-O's bytes came from.
@param log The log.
@param monitor A cancelable task monitor.
@throws Exception if a problem occurs.
Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MachoPrelinkProgramBuilder.java