private void moveSymbolForMemoryBlockMove(MemorySymbol memSymbol, Address newAddress) {
		Address oldAddress = memSymbol.getAddress();

		// If the symbol is not pinned go ahead and move it. Only wrinkle is that there may
		// be a matching symbol at the destination. In that unlikely event, remove it, but preserve
		// its pinned status
		if (!memSymbol.isPinned()) {
			// if we conflict with a symbol at the destination, delete it (it can't be a function)
			// and retain its pinned status if it had one.
			boolean shouldPin = deleteMatchingSymbolAndCheckPinnedStatus(memSymbol, newAddress);
			memSymbol.moveLowLevel(newAddress, null, null, null, shouldPin);
			moveLabelHistory(oldAddress, newAddress);
			return;
		}

		// the other complicated case is a pinned function symbol. In this case we need to move
		// the function symbol, but create a replacement label in the pinned source location. Also,
		// if there is a primary symbol at the destination, we need to remove it and set the
		// function's symbol to that name.
		if (memSymbol.getSymbolType() == SymbolType.FUNCTION) {
			String originalName = memSymbol.getName();
			Namespace originalNamespace = memSymbol.getParentNamespace();
			SourceType originalSource = memSymbol.getSource();
			String newName = "";
			Namespace newNamespace = namespaceMgr.getGlobalNamespace();
			SourceType newSource = SourceType.DEFAULT;
			boolean newPinned = false;
			// see if there is a symbol at the destination
			Symbol destinationPrimary = getPrimarySymbol(newAddress);

			// so there is a symbol at the destination, steal its name and namespace and delete it.
			if (destinationPrimary != null) {
				newName = destinationPrimary.getName();
				newNamespace = destinationPrimary.getParentNamespace();  // use the destination's namespace
				newSource = destinationPrimary.getSource();
				newPinned = destinationPrimary.isPinned();
				destinationPrimary.delete();
			}
			try {
				// so move the symbol to the new address and update namespace, source, and pinned state
				memSymbol.moveLowLevel(newAddress, newName, newNamespace, newSource, newPinned);

				// create a pinned label to replace the pinned function symbol at the source.
				Symbol newSymbol =
					createLabel(oldAddress, originalName, originalNamespace, originalSource);
				newSymbol.setPinned(true);
			}
			catch (InvalidInputException e) {
				// can't happen - name was already valid
			}
		}
	}
Called by the NamespaceManager when a namespace is removed; remove all symbols that have the
given namespace ID.

@param namespaceID ID of namespace being removed
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/SymbolManager.java