Stocks secured robust gains by market close Friday after the latest labor market snapshot breezed past expectations, providing evidence for the U.S. economic recovery.

The S&P 500 was up 0.86%, hitting an all-time record close of 2,182.86. The Dow Jones Industrial Average added 1.04%. The Nasdaq climbed 1.06%, scoring a record close of 5,221.12.

The U.S. economy added 255,000 jobs in July, according to the Labor Department, far higher than an expected increase of 185,000. The U.S. unemployment rate was unchanged at 4.9%, higher than an expected decline to 4.8%. June's jobs gain was revised up to 292,000 from 287,000, while May's jobs were more than doubled to 24,000 from 11,000. Hourly wages rose 2.6%.

"On the whole, this morning's strong July employment report indicates that labor market health remains intact and, in our view, reduces near-term recession risk for the U.S. economy," Jesse Hurwitz, U.S. economist at Barclays Capital, wrote in a note. "Furthermore, the print should boost FOMC members' confidence in the outlook."

The latest strong showing from the labor market for July, plus upward revisions for June and May, increases the chances the Federal Reserve will hike rates at the next meeting. The Fed's Federal Open Market Committee will next meet in September.

Crude oil was slightly lower on Friday after a weekly read on domestic drilling activity showed another increase in the number of active oil rigs. The number of active U.S. oil rigs increased by 7 to 381 in the past week, according to Baker Hughes. Activity has risen for six weeks in a row.

West Texas Intermediate closed down 0.14% at $41.87 a barrel on Friday afternoon.

In earnings news, LinkedIn (LNKD) topped estimates in its recent quarter as it continued to boost its paid-for premium membership. The networking site's adjusted profit of $1.13 a share came in above forecasts of 78 cents a share. Revenue increased 31% to $932.7 million. Microsoft (MSFT - Get Report) is paying $26.2 billion to acquire LinkedIn, the companies announced in June, a deal which should close this year.

Kraft Heinz (KHC - Get Report) exceeded profit estimates in its second quarter. The packaged foods company earned an adjusted 85 cents a share, above estimates of 73 cents, while revenue of $6.8 billion came in as expected. Kraft also increased its quarterly dividend to 60 cents a share from 57.5 cents. The stock rose 4%.

"The earnings beat was carried by Kraft Heinz's truly unmatched ability to extract continued cost savings through successful implementation of its strategic initiatives related to integration, restructuring and productivity," said Jim Cramer and Jack Mohr, co-portfolio managers of Action Alerts PLUS Charitable Trust Portfolio, which holds Kraft. "We are impressed by the consistency of KHC's ability to create value for shareholders in the face of a challenging macro and competitive backdrop."

Kraft Heinz is a holding in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells KHC? Learn more now.

Priceline (PCLN) jumped nearly 5% after reporting a solid second quarter and guiding for in-line third-quarter profit. The online travel agency earned an adjusted $13.93 a share, breezing past consensus of $12.67. Revenue climbed 12% to $2.56 billion but came in slightly short of estimates. Gross travel bookings climbed 19%, above estimates.

Symantec (SYMC - Get Report) bested quarterly forecasts on its top and bottom line. The cyber-security firm earned 29 cents a share in its first quarter, 4 cents above expectations, thanks to a series of cost-cutting efforts. Symantec announced in May plans to cut around 10% of its workforce. Revenue of $884 million was down just over 3%, though it beat consensus estimates by $7 million.

Bristol-Myers Squibb (BMY - Get Report) slumped on Friday after announcing that its drug Opdivo had not met its primary endpoint in a phase III clinical trial. The drug was intended to treat non-small cell lung cancer. Bristol-Myers stock was down by 16%. Merck (MRK - Get Report) rose on the news. Its competing drug Keytruda recently showed positive results in a similar trial.

Rackspace (RAX) soared on Friday on reports it is in talks with Apollo Global (APO - Get Report) about a possible takeover deal. Apollo Global could acquire the the data hosting company for more than $3.5 billion, according to sources cited by Reuters.