ExternalLocation createExternalLabel(final Program program, final String[] path,
			final Address memoryAddress, final SourceType sourceType)
			throws DuplicateNameException, InvalidInputException {

		SymbolTable symbolTable = program.getSymbolTable();
		ExternalManager externalManager = program.getExternalManager();
		int nameIndex = path.length - 1;

		Library externalLibrary;
		Symbol librarySymbol = getUniqueSymbol(program, path[0], program.getGlobalNamespace());
		if (librarySymbol != null) {
			externalLibrary = (Library) librarySymbol.getObject();
		}
		else {
			externalLibrary = symbolTable.createExternalLibrary(path[0], sourceType);
		}

		Namespace currentNamespace = externalLibrary;
		for (int i = 1; i < nameIndex; i++) {
			Symbol nextNamespaceSymbol = getUniqueSymbol(program, path[i], currentNamespace);
			if (nextNamespaceSymbol != null) {
				currentNamespace = (Namespace) nextNamespaceSymbol.getObject();
			}
			else {
				currentNamespace =
					symbolTable.createNameSpace(currentNamespace, path[i], sourceType);
			}
		}

		ExternalLocation externalLocation = externalManager.addExtLocation(currentNamespace,
			path[nameIndex], memoryAddress, sourceType);

		return externalLocation;
	}
Changes the function's parameter indicated by index to be a stack
parameter with the indicated stack offset.
@param func the function
@param index the index of an existing parameter
@param stackOffset the stack offset for this parameter
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/AbstractExternalMergerTest.java