It certainly is problem specific. E.g., for linear GMM estimators, we can find an analytical solution to the problem (using the notation from Hayashi's book, i.e., instruments $x$, regressors $z$, coefficient vector $\delta$, sample moments denoted by $S$, weighting matrix $\hat W$)
$$
\widehat{\delta}(\widehat{W}):=\text{argmin}_{\tilde{\delta}}J(\tilde{\delta},\widehat{W}),
$$
where
$$J(\tilde{\delta},\widehat{W}):=n\cdot g_n(\tilde{\delta})'\widehat{W}g_n(\tilde{\delta}),$$
so that, unlike for nonlinear problems, there is no need for iterative methods:
$J(\tilde{\delta},\widehat{W})$ can be written as
$$
J(\tilde{\delta},\widehat{W})=n(s_{xy}-S_{xz}\tilde{\delta})'\widehat{W}(s_{xy}-S_{xz}\tilde{\delta})
$$
Accordingly, the first order condition for a minimum is
$$
\frac{\partial}{\partial\tilde{\delta}}J(\tilde{\delta},\widehat{W})=0
$$
Multiplying out the terms in $J(\tilde{\delta},\widehat{W})$ gives
$$
\frac{\partial}{\partial\tilde{\delta}}n(s_{xy}'\widehat{W}s_{xy}-2\tilde{\delta}'S_{xz}'\widehat{W}s_{xy}+\tilde{\delta}'S_{xz}'\widehat{W}S_{xz}\tilde{\delta})=0
$$
The derivative follows as
\begin{eqnarray}
-2S_{xz}'\widehat{W}s_{xy}+2S_{xz}'\widehat{W}S_{xz}\tilde{\delta}&=&0\notag\\
\Rightarrow\hspace{4cm}S_{xz}'\widehat{W}S_{xz}\tilde{\delta}&=&S_{xz}'\widehat{W}s_{xy}.
\end{eqnarray}
Premultiplying with the (invertible for sufficiently large $n$) matrix
$$(S_{xz}'\widehat{W}S_{xz})^{-1}$$ gives the solution, the GMM estimator
\begin{equation}
\widehat{\delta}(\widehat{W})=(S_{xz}'\widehat{W}S_{xz})^{-1}S_{xz}'\widehat{W}s_{xy}
\end{equation}
or equivalently,
\begin{equation}
\widehat{\delta}(\widehat{W})=(Z'X\widehat{W}X'Z)^{-1}Z'X\widehat{W}X'y.
\end{equation}