To find the shape and position of one or several obstacles embedded in a 2D or 3D elastic medium given ultrasonic measurements performed with a linear array of sensors, we use a topological gradient method. It consists in minimizing a cost function which evaluates the adequation between the measurements obtained for the inspected medium and measurements performed on a reference medium known as safe. The topological gradient is a function of both the solutions of the forward and adjoint problems. The mathematical solution of such an adjoint problem corresponds to a physical time reversal operation. This inverse method is therefore physically justified and inheritance of the refocusing properties of the time reversal phenomenon is expected.