void copySymbols(Address fromAddress, boolean replacePrimary, boolean replaceFunction,
			LongLongHashtable conflictSymbolIDMap, TaskMonitor monitor)
			throws CancelledException, DuplicateNameException, InvalidInputException {

		Address toAddress = originToResultTranslator.getAddress(fromAddress);
		addFromSymbols(fromAddress, false, conflictSymbolIDMap, monitor);
		mergeFunctionSymbol(fromAddress, replacePrimary || replaceFunction, conflictSymbolIDMap,
			monitor);

		if (replacePrimary) {
			replacePrimary(toAddress, conflictSymbolIDMap);
		}

		// Make this address an entry point if its one in program2.
		if (fromSymbolTable.isExternalEntryPoint(fromAddress) &&
			!toSymbolTable.isExternalEntryPoint(toAddress)) {
			toSymbolTable.addExternalEntryPoint(toAddress);
		}
	}
replaceSymbol adds the symbol and its aliases from the fromProgram's SymbolTable to
 the toProgram's SymbolTable. If the toSymbolTable already has a symbol (and
 possibly aliases) they are removed and the symbol and aliases from the
 fromProgram's SymbolTable are added.
@param fromAddress the address where the symbols will be copy from/to.
This address should be derived from the "from" program.
@param replacePrimary true indicates that the primary symbol in the "to" program should be
set to the same symbol as was primary in the "from" program.
@param replaceFunction true indicates that the function symbol in the "to" program should be
set to the same function symbol as in the "from" program.
@param conflictSymbolIDMap maps the symbol IDs in the "from" program to the symbol IDs
in the "to" program for any symbols (and their associated objects) that were created
with conflict names.
(key = "from" program's symbol ID; value = "to" program's symbol ID)
@param monitor the task monitor for notifying the user of this merge's progress.
@return the symbol now at the address in the toSymbolTable.

@throws CancelledException if user cancels via the monitor.
@throws InvalidInputException if a symbol name from the second program isn't valid
@throws DuplicateNameException if a duplicate name is encountered that couldn't be handled
while copying a symbol.
Ghidra/Features/Base/src/main/java/ghidra/program/util/SymbolMerge.java