Preheat oven to 400 degrees.
Place garlic in a ramekin dish. Pour enough oil to cover. Wrap in double thickness of foil. Bake until very tender, about 35 minutes.
Using a slotted spoon, transfer garlic and 1 tablespoon of oil to a small bowl. Squeeze garlic cloves out of heads of garlic. Place cloves and oil in a food processor. Add butter and purée. Season with salt and pepper.
Arrange salmon fillets on a baking sheet. Season with salt and pepper. Sprinkle each with lemon juice and spread 1 tablespoon of garlic butter purée over each.
Bake uncovered about 15 minutes. Sprinkle with rosemary.