Stocks rallied on Friday, pushing benchmark indexes into positive territory for the week, after the latest read on the labor market breezed past expectations.

The S&P 500 was up 0.8%, the Dow Jones Industrial Average added 0.92%, and the Nasdaq climbed 1.1%.

The S&P 500 hit an all-time intraday record of 2,182.33 earlier in the session.

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 was down 0.88% to $41.56 a barrel on Friday afternoon. 

The U.S. trade deficit rose 8.7% in June to $44.5 billion. U.S. exports increased 0.3% and imports were up 1.9%, according to the Census Bureau.

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.

Zynga (ZNGA - Get Report) fell 7% lower after reporting a steady decline in average daily active users. The social game company, developer of Farmville, said active users fell 15% from a year earlier and average monthly users dropped 26%, while revenue declined 9% to $181.7 million, $10 million below forecasts.

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 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.

FireEye (FEYE - Get Report) slumped 12% after new chief executive Kevin Mandia announced plans to cut hundreds of jobs in restructuring efforts. The plans intend to reduce around $80 million in annual expenses. The exact number of layoffs are not yet known.

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.6%. 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