Well, let's calculate the gravitational potential for a homogeneous sphere. There are two ways. One is to use the superposition principle, and "add" Newton's potential for a point mass up, which leads to
$$g(\vec{x})=-G \int_{V} \mathrm{d}^3 \vec{x}' \frac{\rho(\vec{x}')}{|\vec{x}-\vec{x}'|}.$$
A bit more mathematically spoken, that's just folding the mass-density distribution ##\rho## with the Green's function of the Laplace operator. This means that you can reformulate Newton's gravitation law in terms of a local field equation, which is very clever compared to write down the above integral form:
\begin{equation}
\label{1}
\Delta g=4 \pi G \rho.
\end{equation}
Now you have a (partial) differential equation instead of an integral.
Since we deal with a highly symmetric situation, it can be simplified to an ordinary differential equation. Just introduce spherical coordinates ##(r,\vartheta,\varphi)##. Now due to spherical symmetry, the potential and ##\rho## only depend on ##r##. Now you use the Laplacian in spherical coordinates to get
$$\frac{1}{r} \frac{\mathrm{d}^2}{\mathrm{d} r^2} [r g(r)]=4 \pi G \rho.$$
Now for ##r<R## (where ##R## is the radius of the homogeneous sphere) you have ##\rho=\rho_0=\text{const}##. You can immidiately integrate the equation:
$$\frac{\mathrm{d}^2}{\mathrm{d} r^2} [r g(r)]=4 \pi G r \rho_0.$$
The first integration gives
$$[r g(r)]'=2 \pi G \rho_0 r^2+C_1,$$
where ##C_1## is an integration constant, and the second integration leads to
$$g(r)=\frac{2 \pi G \rho_0}{3} r^2 + C_1 + \frac{C_2}{r}, \quad r<R.$$
For ##r>R## you just need to set ##\rho_0=0## in this equation, which gives
$$g(r)=C_1'+ \frac{C_2'}{r}, \quad r \geq R.$$
We can choose the constant arbitrarily since it doesn't provide anything to the gravitational force to a test mass, ##m##, which is given by ##\vec{F}=-m \vec{\nabla} g##. Usually one likes the potential to vanish at infinity. So we set ##C_1'=0##. For ##r<R##, we shouldn't have a singularity at ##r=0## since we deal with a smooth mass distribution there, which leads to ##C_2=0##. So far we thus have
\begin{equation}
\label{2}
g(r)=\begin{cases}
\frac{2 \pi G \rho_0}{3} r^2 + C_1 & \text{for} \quad r<R,\\
\frac{C_2'}{r} \quad r>R.
\end{cases}
\end{equation}
Now we somehow have to determine the remaining constants ##C_1## and ##C_2'##. To that end we go back to Eq. (\ref{1}). Now we can use Gauss's integral law to integrate this equation over an arbitrary volume. We choose a sphere ##K_a## around the center with radius ##a>R##. Then Gauss's Law tells us
$$\int_{\partial K_a} \mathrm{d}^2 \vec{F} \cdot \vec{\nabla} g=4 \pi G \int_{K_a} \mathrm{d}^3 \vec{\rho}.$$
Now, on the right-hand side the volume integral integrates over the entire mass distribution, i.e., it's simply the total mass of the spherically symmetric body! The left-hand side is easily calculated. Since the surface ##\partial K_a## is at ##r=a>R##, we have according to Eq. (\ref{2})
$$\vec{\nabla} g=g'(r) \vec{e}_r=-\frac{C_2}{r^2} \vec{e}_r.$$
Since further ##\mathrm{d}^2 \vec{F}=\mathrm{d} \varphi \mathrm{d} \vartheta a^2 \sin \vartheta \vec{e}_r##, we find
$$-4 \pi C_2=4 \pi G M \; \Rightarrow \; C_2=-G M,$$
i.e., outside the mass distribution we have
$$g(r)=-\frac{G M}{r}=-\frac{4 \pi G R^3 \rho_0}{3r}, \quad r>R.$$
This is Newton's Gravitational Law for a point particle with the total mass of the sphere (it's easy to prove that this is true for any radially symmetric mass distribution extending over only a finite region around the center).
Finally the constant ##C_1## is found by making the gravitational potential continuous at ##r=R##, leading to
$$\frac{2 \pi G \rho_0 R^2}{3}+C_1=-\frac{4 \pi G R^2 \rho_0}{3} \; \Rightarrow \; C_1=-2 \pi G \rho_0 R^2.$$
Put this in (\ref{2}), we finally have
$$g(r)=\begin{cases}
\frac{2 \pi G \rho_0}{3}(r^2-3R^2) &\text{for} \quad r \leq R,\\
-\frac{4 \pi G \rho_0 R^3}{3R} & \text{for} \quad r >R.
\end{cases}$$
This shows the correctness of Posting #3.
Suppose you drill a small hole along a diameter through the sphere. Then a body of mass ##m## inside this hole feels the gravitational force
$$\vec{F}=-m \vec{\nabla} g=-\frac{4 \pi m G \rho_0}{3} r \vec{e}_r=-\frac{G M}{R^3} r \vec{e}_r.$$
This is the equation of motion of a harmonic oscillator, i.e., a mass started at rest at the surface will oscillate back and forth forever (assuming no friction).
Of course, that's unrealistic for the earth, which is not homogeneous. There's a great paper by a graduate student (!) in AJP about this issue. It's really a great read:
Alexander R. Klotz, The gravity tunnel in a non-uniform Earth, Am. J. Phys. 83, 231 (2015)
http://dx.doi.org/10.1119/1.4898780
http://arxiv.org/abs/1308.1342
Of course, it's still a bit academic, because so far nobody has drilled a whole through the entire Earth through the center, and we cannot check, how long it takes for a body to fall through the Earth from one end to the other ;-).