@Override
	public boolean applyTo(Program program) {
		SymbolTable st = program.getSymbolTable();
		Symbol s = st.getSymbol(name, addr, scope);
		if (s == null) {
			errorMsg = "Symbol " + name + " not found!";
			return false;
		}
		if (s.isDynamic()) {
			errorMsg =
				"Deleting the dynamic symbol \"" + name + "\" @ " + addr + " is not allowed.";
			return false;
		}
		if (s.isExternalEntryPoint() && s.isPrimary()) {
			if (st.getSymbols(s.getAddress()).length == 1) {
				externalEntryCmd = new ExternalEntryCmd(addr, false);
				externalEntryCmd.applyTo(program);
			}
		}
		boolean success = st.removeSymbolSpecial(s);
		if (!success) {
			errorMsg = "Couldn't delete the symbol \"" + name + "\" @ " + addr + ".";
		}
		return success;
	}
Constructs a new command for deleting a global symbol
@param addr address of the label to be deleted.
@param name name of the label to be deleted.
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/label/DeleteLabelCmd.java