What is the differential of $X'X$? Let $X = (x_{ij})$ be a square matrix with $n\times n$ variables in $\mathbf{R}$. Could you tell me the $\text{d}(X'X)$ when $X$ has a full column rank?

[Update]
Honestly speaking. What I have got is:
$$
\text{d} X'X = (\text{d} X')X  + X'\text{d}X. \tag{1}
$$
But the text book of matrix differential calculus with applications in statistics and econometrics seems give a different result at page 171 excercise 3 as stated below:

Show that $\text{d} \log |X'X| = 2 \text{ tr}(X'X)^{-1}X'\text{d}X$ at every point where $X$ has full column rank.

As I know:
$$
\begin{align}
\text{d} \log |X'X| &= \text{ d} \text{ tr}(\log|X'X|) \\
& = \text{ tr}(\text{d}\log|X'X|) \\
& = \text{ tr}((X'X)^{-1}\text{d}(X'X)) \\
\end{align}
$$
With result in (1), I cannot obtain $\text{d} \log |X'X| = 2 \text{ tr}(X'X)^{-1}X'\text{d}X$ as stated above. Could you help me to solve this?

After some exploration, I intend to answer my question.
Lets assume $X$ has $m\times n$ variables where $m \leq n$. 
First we have 
$$
{\rm d} XX' = ({\rm d}X)X' + X({\rm d}X'). \tag{1}
$$
Then 
$$
\begin{align}
{\rm d} |XX'| &= {\rm tr} \big( (XX')^\# {\rm d} (XX') \big) \\
& = {\rm tr} \bigg( (XX')^\# \big(({\rm d}X)X' + X({\rm d}X')\big)\bigg)\\
& = {\rm tr} \bigg( (XX')^\# ({\rm d}X)X' + (XX')^\#X{\rm d}X'\bigg)\\
& = {\rm tr} \bigg( X'(XX')^\# ({\rm d}X)\bigg) + {\rm tr}\bigg( (XX')^\#X{\rm d}X'\bigg)\\
& = {\rm tr} \bigg( X'(XX')^\# ({\rm d}X)\bigg) + {\rm tr}\bigg(X' (XX')^\#{\rm d}X \bigg)\\
& = 2 {\rm tr} \bigg( X'(XX')^\# ({\rm d}X)\bigg)
\end{align}
$$
Futher
$$
\begin{align}
{\rm d} \log |XX'| &= \frac{1}{|XX'|} {\rm d} |XX'| \\
& = \frac{2}{|XX'|} {\rm tr} \bigg( X'(XX')^\# {\rm d}X\bigg) \\
& = 2\ {\rm tr} \bigg( X'\frac{(XX')^\#}{|XX'|} {\rm d}X\bigg) \\
& = 2\ {\rm tr} \bigg( X'(XX')^{-1} {\rm d}X\bigg) \\
\end{align}
$$
