In the present paper the Hadamard formula is derived for the differentiable shape functionals in nonsmooth domains. The structure theorem is applied to the shape sensitivity analysis of optimal control problems and nonlinear problems with unilateral conditions prescribed on the crack faces. The form of the first order shape derivatives of the associated shape functionals is obtained in terms of singularity coefficients of solutions to elliptic equations under considerations.