private void addCodeSymbolsToSet(Program program, AddressSetView addressSet,
			TaskMonitor monitor, Set<Address> set) throws CancelledException {
		SymbolTable symbolTable = program.getSymbolTable();
		SymbolIterator symbolIter = symbolTable.getSymbols(addressSet, SymbolType.LABEL, true);

		while (symbolIter.hasNext()) {
			monitor.checkCancelled();
			Symbol entry = symbolIter.next();
			Address entryAddr = entry.getAddress();
			if (addressSet.contains(entryAddr)) {
				set.add(entryAddr);
			}
		}
	}
Check for a single external entry point.

@param program - program to check
@param externalCount - count of external entry points found
@param doNowSet - set of functions that are to be done now

@return true if this program has only one external entry point
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/disassembler/EntryPointAnalyzer.java