General Motors is recalling more than one million pickup trucks and sport-utility vehicles in the U.S. for a steering defect, the latest example of a problem generated by the industry’s growing use of software to control a car’s mechanical functions.