@Override
	protected void processNewExport(Address baseAddr, ExportEntry export, String name)
			throws AddressOutOfBoundsException, Exception {
		SymbolTable symbolTable = program.getSymbolTable();
		FunctionManager funcManager = program.getFunctionManager();
		ExternalManager extManager = program.getExternalManager();

		// Add the new exported symbol, but only make it an entry point if it's from the primary 
		// thing being loaded
		Address exportAddr = baseAddr.add(export.address());
		program.getSymbolTable().createLabel(exportAddr, name, SourceType.IMPORTED);
		if (!loadInto) {
			program.getSymbolTable().addExternalEntryPoint(exportAddr);
		}

		for (Symbol sym : symbolTable.getGlobalSymbols(name)) {

			// If it's a thunk function (stub), redirect its thunked function from the external
			// location to the newly exported function
			Function func = funcManager.getFunctionAt(sym.getAddress());
			if (func != null && func.getThunkedFunction(false) != null) {
				func.setThunkedFunction(createOneByteFunction(program, name, exportAddr));

				// Remove the external location associated with the thunk function.
				// After the first delete, the external location becomes an external label, which
				// must also get deleted.
				ExternalLocation loc = extManager.getUniqueExternalLocation(Library.UNKNOWN, name);
				if (loc != null) {
					if (loc.getSymbol().delete()) {
						loc = extManager.getUniqueExternalLocation(Library.UNKNOWN, name);
						if (loc != null) {
							loc.getSymbol().delete();
						}
					}
				}
			}

		}
	}
Builds up a {@link Program} of Mach-O components extracted from a Mach-O container

@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 loadInto True if the Mach-O is being loaded into an existing program; otherwise, false
@param log The log.
@param monitor A cancelable task monitor.
@throws Exception if a problem occurs.
Ghidra/Features/FileFormats/src/main/java/ghidra/app/util/opinion/MachoExtractProgramBuilder.java