private Symbol checkForAssociatedExternalSymbol(Symbol symbol) {
		Program program = symbol.getProgram();
		Address addr = symbol.getAddress();
		if (addr.isExternalAddress()) {
			return symbol;
		}

		Data data = program.getListing().getDefinedDataAt(symbol.getAddress());
		if (data == null || !data.isPointer()) {
			return symbol;
		}

		// get the code unit at the location
		// if there is a reference to an external, place the function there.
		Reference[] referencesFrom = program.getReferenceManager().getReferencesFrom(addr);
		for (Reference reference : referencesFrom) {
			if (reference.isExternalReference()) {
				return program.getSymbolTable().getPrimarySymbol(reference.getToAddress());
			}
		}

		return symbol;
	}
If symbol corresponds to a pointer which references an external symbol return 
the referenced external symbol, otherwise return the symbol provided.</li>
@param symbol - symbol to check for an external reference
@return referenced external symbol or original symbol
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/NoReturnFunctionAnalyzer.java