Combine sugar, flour, cornmeal and salt in a large bowl; add buttermilk and eggs, stirring until blended. Stir in vanilla and margarine, and pour into unbaked pastry shell.
Bake in 350 degree oven for 40-45 minutes or until set. Check for doneness after the minimum baking time by gently shaking the pie. The center should be set with a slight jiggle. Cool on a wire rack.