General Motors has posted a greatly reduced loss for 2006.