Over medium heat, saute the garlic in the olive oil until golden. Add the mushrooms and cook until their juices evaporate. Add the olives, salt and pepper. Simmer.
Meanwhile, bring a large pot of salted water to a boil. Cook the pasta until al dente (2 minutes less than the package recommends). Drain, retaining 1 cup of the cooking water.
Add the pasta to the mushroom mixture. Over medium heat, add some of the water until moist and warm for about a minute. Mix in the Pecorino. Serve immediately.