private static boolean hasLinkageReference(Program program, Function thunkFunction,
			AddressSetView linkageSet) {
		ReferenceManager referenceManager = program.getReferenceManager();
		for (Address addr : referenceManager.getReferenceSourceIterator(thunkFunction.getBody(),
			true)) {
			for (Reference ref : referenceManager.getReferencesFrom(addr)) {
				if (linkageSet.contains(ref.getToAddress())) {
					return true;
				}
			}
		}
		return false;
	}
Determine if the specified thunkFunction's body contains any references to addresses
contained within the linkageSet provided.
@param thunkFunction possible linkage thunk
@param linkageSet set of previously discovered linkage pointer locations
@return true if function contains one or more references to addresses contained
within the linkageSet of addresses, else false
Ghidra/Features/Base/src/main/java/ghidra/app/nav/NavigationUtils.java