@Override
	public Reference addOffsetMemReference(Address fromAddr, Address toAddr, boolean toAddrIsBase,
			long offset, RefType type, SourceType sourceType, int opIndex) {
		if (!fromAddr.isMemoryAddress() || !toAddr.isMemoryAddress()) {
			throw new IllegalArgumentException("From and To addresses must be memory addresses");
		}

		// Handle EXTERNAL Block offset-reference transformation
		boolean isExternalBlockRef = isExternalBlockAddress(toAddr);
		boolean badOffsetReference = false;
		if (isExternalBlockRef) {
			// NOTE: Resulting EXTERNAL Block reference may become incorrect 
			// if EXTERNAL block is moved or removed. 
			if (!toAddrIsBase) {
				Address baseAddr = toAddr.subtractWrap(offset);
				if (isExternalBlockAddress(baseAddr)) {
					toAddr = baseAddr;
					toAddrIsBase = true;
				}
				else {
					// assume unintentional reference into EXTERNAL block
					isExternalBlockRef = false;
					badOffsetReference = true;
				}
			}
		}
		else if (toAddrIsBase) {
			toAddr = toAddr.addWrap(offset);
			if (isExternalBlockAddress(toAddr)) {
				badOffsetReference = true;
			}
		}

		if (badOffsetReference) {
			Msg.warn(this,
				"Offset Reference from " + fromAddr + " produces bad Xref into EXTERNAL block");
		}

		try {
			removeNonMemRefs(fromAddr, opIndex);
			return addRef(fromAddr, toAddr, type, sourceType, opIndex, true, false, offset);
		}
		catch (IOException e) {
			program.dbError(e);
		}
		return null;
	}
When adding a reference on top of an existing reference, attempt to combine
the reference types giving preference to the most specific type.
@param newType the new type
@param oldType the old type
@return combined reference type, or the newType if unable to combine
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/references/ReferenceDBManager.java