  An identity that relates multipolar solutions of the Einstein equations to
Newtonian potentials of bars with linear densities proportional to Legendre
polynomials is used to construct analytical potential-density pairs of
infinitesimally thin bars with a given linear density profile. By means of a
suitable transformation, softened bars that are free of singularities are also
obtained. As an application we study the equilibrium points and stability for
the motion of test particles in the gravitational field for three models of
rotating bars.
