Concern about a June interest-rate hike faded on Friday as technology-industry earnings drove U.S. markets higher.

A better-than-expected quarter from Applied Materials (AMAT) - Get Report alleviated worries over the health of the tech sector, helping drive up the S&P 500 by 0.6%. The Dow Jones Industrial Average climbed 0.37%, and the Nasdaq added 1.2%.

Applied Materials rose 13% after beating second-quarter estimates and reporting a double-digit gain in orders. The chipmaker reported 52% orders growth compared with the previous three months, while earnings of 34 cents a share beat by analysts' projections 2 cents. Its third quarter also looks strong, with expected sales growth of 14% to 18%.

The tech sector has been hard hit over this earnings season with big misses from industry giants including Apple (AAPL) - Get Report and Alphabet (GOOGL) - Get Report .

Apple and Alphabet are holdings in Jim Cramer'sAction Alerts PLUS Charitable Trust Portfolio. Want to be alerted before he buys or sells the stocks?Learn more now.

Large-cap tech companies including Apple, Alphabet, Microsoft (MSFT) - Get Report , Oracle (ORCL) - Get Report and Intel (INTC) - Get Report were all higher on Friday, while the Technology Select Sector SPDR ETF (XLK) - Get Report added 1.2%.

Crude oil remained lower as the number of U.S. rigs drilling in oilfields held flat at 318, according to Baker Hughes data. Commodities climbed earlier in the week amid supply outages in Nigeria, reduced production in wildfire-stricken Alberta, Canada, and a bullish turn for a number of analysts. West Texas Intermediate crude oil was down 0.9% to $47.75 a barrel on Friday.

Investors appeared to be coming to terms, meanwhile, with the increased likelihood of a rate hike in June. Minutes from the Fed's April meeting released on Wednesday suggested many members would be comfortable raising rates as soon as next month, more quickly than even the most hawkish of economists' forecasts. A June rate hike now has a 30% probability, according to CME Group. The likelihood had been priced in at less than 10% at the beginning of May.

"The recent improvement in consumption and inflation data out of the U.S., in context of the recent April Federal Open Market Committee minutes, has market participants rapidly scaling up the chances of a rate hike in June," said Christopher Vecchio, currency analyst at DailyFX.

Outside of tech, Friday's earnings were a mixed bag. In retail, Gap (GPS) - Get Report climbed after reporting an in-line first quarter and announcing plans to shut down all 53 of its Old Navy stores in Japan and a number of international Banana Republic stores. Foot Locker (FL) - Get Report  , on the other hand, reported a mixed first quarter. Same-store sales growth of 2.9% missed forecasts of 4.5%.

Deere& Co. (DE) - Get Report was lower after a challenging second quarter. The farm machinery maker reported a 28% decline in profit and 4% slide in revenue, a reflection of the "downturn in global farm economy." The company expects equipment sales to drop 9% in fiscal 2016.

Campbell Soup (CPB) - Get Report  topped quarterly profit and raising full-year earnings guidance. The canned goods company expects full-year adjusted earnings between $2.93 and $3 a share, up from a previous range of $2.88 to $2.96 a share. Campbell reaffirmed an earlier projection that full-year sales would be flat or down 1%, and the shares slid 6.4%.