  Let $(R,\mathfrak{m})$ be a commutative Noetherian local ring, $\mathfrak{a}$
be a proper ideal of $R$ and $M$ be an $R$-complex in $\mathrm{D}(R)$. We prove
that if $M\in\mathrm{D}^f_\sqsubset(R)$ (respectively,
$M\in\mathrm{D}^f_\sqsupset(R)$), then
$\mathrm{id}_R\mathbf{R}\Gamma_{\mathfrak{a}}(M)=\mathrm{id}_R M$
(respectively, $\mathrm{fd}_R\mathbf{R}\Gamma_{\mathfrak{a}}(M)=\mathrm{fd}_R
M$). Next, it is proved that the right derived section functor of a complex
$M\in\mathrm{D}_\sqsubset(R)$ ($R$ is not necessarily local) can be computed
via a genuine left-bounded complex $G\simeq M$ of Gorenstein injective modules.
We show that if $R$ has a dualizing complex and $M$ is an $R$-complex in
$\mathrm{D}^f_\square(R)$, then
$\mathrm{Gfd}_R\mathbf{R}\Gamma_{\mathfrak{a}}(M)=\mathrm{Gfd}_R M$ and
$\mathrm{Gid}_R\mathbf{R}\Gamma_{\mathfrak{a}}(M)=\mathrm{Gid}_R M$. Also, we
show that if $M$ is a relative Cohen-Macaulay $R$-module with respect to
$\mathfrak{a}$ (respectively, Cohen-Macaulay $R$-module of dimension $n$), then
$\mathrm{Gfd}_R\mathbf{H}^{\mathrm{ht_M\mathfrak{a}}}_{\mathfrak{a}}(M)=\mathrm{Gfd}_RM+n$
(respectively,
$\mathrm{Gid}_R\mathbf{H}^n_{\mathfrak{m}}(M)=\mathrm{Gid}_RM-n$). The above
results generalize some known results and provide characterizations of
Gorenstein rings.
