private Symbol getExternalSymbol(Program externalProgram, ExternalLocation externalLoc) {

		// assume global symbol name if mangled name (same as original name) exists
		String label = externalLoc.getOriginalImportedName();
		SymbolPath symbolPath;
		if (label == null) {
			// use alternate symbol (may or may not be mangled)
			Symbol s = externalLoc.getSymbol();
			if (s.getSource() == SourceType.DEFAULT) {
				return null; // must rely on address for navigation
			}
			symbolPath = new SymbolPath(s, true);
		}
		else {
			symbolPath = new SymbolPath(label);
		}

		Symbol symbol = null;
		int count = 0;
		for (Symbol s : NamespaceUtils.getSymbols(symbolPath, externalProgram)) {
			symbol = s;
			++count;
			if (s.isExternalEntryPoint()) {
				return symbol;
			}
		}

		return count == 1 ? symbol : null;
	}
Navigate to either the external program location or address linkage location.
<p>
This method will only navigate to the external program associated with the specified location
if either checkNavigationOption is false, or the navigation option is set to Show External
Program, or the current location is the same as the single linkage location. See
{@link #goToExternalLinkage(Navigatable, ExternalLocation, boolean)} method for external
linkage navigation behavior.
<p>
If navigation to an external program will be performed, the associated program will be
identified and the location within that program found. Once this occurs, the external program
will be opened within the current tool and navigation completed. If an external program
association has not yet been established, the user will be prompted to make an association if
they choose before completing the navigation.

@param nav Navigatable
@param externalLocation external location
@param checkNavigationOption if true the
           {@link NavigationOptions#isGotoExternalProgramEnabled} option will be used to
           determine if navigation to the external program will be attempted, or if
           navigation to the external linkage location within the current program will be
           attempted. If false, only navigation to the external linkage will be attempted.
@return true if navigation to the external program was successful or navigation to a linkage
        location was performed.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/gotoquery/GoToHelper.java