Richard King is an Oscar-winning sound designer who most recently worked on Inception. Wired takes a brief (spoiler-free) inside look at how he and his team went about capturing the sounds heard in the movie:
The field crew nabbed a van off Craigslist.com and took it out to the Mojave desert to record ricochet sounds. Grabbing the full dynamic range of bullets hitting, puncturing, and bouncing off the van called for recording rigs at the point of impact and sometimes as far as 100 yards away.
Follow the link for more, including video of some car-sound recording (but not the gunfire, sorry).